Constructor and Description |
---|
RSA() |
Modifier and Type | Method and Description |
---|---|
static KeyPair |
createKeyPair() |
static byte[] |
decrypt(byte[] data,
PublicKey publicKey,
int offset) |
static byte[] |
encrypt(byte[] data,
PrivateKey privateKey) |
static PrivateKey |
toPrivateKey(String privateKey) |
static PublicKey |
toPublicKey(String publicKey) |
static String |
toString(PrivateKey privateKey) |
static String |
toString(PublicKey publicKey) |
public RSA()
public static String toString(PrivateKey privateKey)
public static PrivateKey toPrivateKey(String privateKey) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException
public static PublicKey toPublicKey(String publicKey) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException
public static KeyPair createKeyPair() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static byte[] encrypt(byte[] data, PrivateKey privateKey) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
public static byte[] decrypt(byte[] data, PublicKey publicKey, int offset) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
Copyright © 2015 Lucee