public final class RSAEncryption extends Encryption<PublicKey,PrivateKey>
Modifier and Type | Field and Description |
---|---|
static String |
KEY_ALGORITHM_DSA |
static String |
KEY_ALGORITHM_RSA |
Modifier | Constructor and Description |
---|---|
protected |
RSAEncryption(XdiAttribute xdiAttribute) |
Modifier and Type | Method and Description |
---|---|
void |
decrypt(PrivateKey privateKey)
Decrypt the encryption value.
|
void |
encrypt(PublicKey publicKey)
Create the encryption value.
|
static RSAEncryption |
fromXdiAttribute(XdiAttribute xdiAttribute)
Factory method that creates an XDI encryption bound to a given XDI attribute.
|
String |
getTransformation() |
static boolean |
isValid(XdiAttribute xdiAttribute)
Checks if an XDI attribute is a valid XDI encryption.
|
clearAfterDecrypt, clearAfterEncrypt, compareTo, equals, getBaseContextNode, getContextNode, getKeyAlgorithm, getKeyLength, getValue, getXdiAttribute, hashCode, setValue, toString
public static final String KEY_ALGORITHM_RSA
public static final String KEY_ALGORITHM_DSA
protected RSAEncryption(XdiAttribute xdiAttribute)
public static boolean isValid(XdiAttribute xdiAttribute)
xdiAttribute
- The XDI attribute to check.public static RSAEncryption fromXdiAttribute(XdiAttribute xdiAttribute)
xdiAttribute
- The XDI attribute that is an XDI encryption.public String getTransformation()
getTransformation
in class Encryption<PublicKey,PrivateKey>
public void encrypt(PublicKey publicKey) throws GeneralSecurityException
Encryption
encrypt
in class Encryption<PublicKey,PrivateKey>
GeneralSecurityException
public void decrypt(PrivateKey privateKey) throws GeneralSecurityException
Encryption
decrypt
in class Encryption<PublicKey,PrivateKey>
GeneralSecurityException
Copyright © 2017. All rights reserved.