public class SecuredRSAUsage
extends java.lang.Object
| Constructor | Description |
|---|---|
SecuredRSAUsage() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
rsaDecrypt(byte[] encryptedMessage,
java.security.Key privateKey) |
Attempts to decrypt the
message with an asymmetric encryption |
static java.lang.String |
rsaEncrypt(java.lang.String message,
java.security.Key publicKey) |
Attempts to encrypt the
message with an asymmetric encryption |
public static java.lang.String rsaEncrypt(java.lang.String message,
java.security.Key publicKey)
throws java.lang.Exception
message with an asymmetric encryptionmessage - the string to encryptpublicKey - the public Key to be used for encryptionjava.lang.Exceptionpublic static java.lang.String rsaDecrypt(byte[] encryptedMessage,
java.security.Key privateKey)
throws java.lang.Exception
message with an asymmetric encryptionencryptedMessage - the string to encryptprivateKey - the public Key to be used for encryptionjava.lang.Exception