public class RSAUtil
extends java.lang.Object
| Constructor and Description |
|---|
RSAUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decrypt(java.security.Key key,
byte[] raw) |
static java.lang.String |
decrypt(java.security.Key key,
java.lang.String raw) |
static byte[] |
encrypt(java.security.Key key,
byte[] data) |
static java.lang.String |
encrypt(java.security.Key key,
java.lang.String data) |
static java.security.KeyPair |
generateKeyPair() |
protected static java.security.interfaces.RSAPrivateKey |
generateRSAPrivateKey(byte[] modulus,
byte[] privateExponent) |
static java.security.interfaces.RSAPublicKey |
generateRSAPublicKey(byte[] modulus,
byte[] publicExponent) |
static java.security.interfaces.RSAPrivateKey |
getRSAPrivateKey(java.lang.String key) |
static java.security.interfaces.RSAPublicKey |
getRSAPublicKey(java.lang.String key) |
public static java.security.KeyPair generateKeyPair()
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static java.security.interfaces.RSAPublicKey getRSAPublicKey(java.lang.String key)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static java.security.interfaces.RSAPublicKey generateRSAPublicKey(byte[] modulus,
byte[] publicExponent)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static java.security.interfaces.RSAPrivateKey getRSAPrivateKey(java.lang.String key)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionprotected static java.security.interfaces.RSAPrivateKey generateRSAPrivateKey(byte[] modulus,
byte[] privateExponent)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static java.lang.String encrypt(java.security.Key key,
java.lang.String data)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static byte[] encrypt(java.security.Key key,
byte[] data)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static java.lang.String decrypt(java.security.Key key,
java.lang.String raw)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionExceptionpublic static byte[] decrypt(java.security.Key key,
byte[] raw)
throws org.bouncycastle.openssl.EncryptionException
org.bouncycastle.openssl.EncryptionException