RSA-based cryptographic functions. More...
Static Public Member Functions | |
| static int | getDefaultKeySize () |
| static void | setDefaultKeySize (int defaultKeySize) |
| static RsaKey | createKey () |
| Creates an RSA key. More... | |
| static RsaKey | createKey (int keySize) |
| Creates an RSA key. More... | |
| static PrivateKey | getPrivateKey (RsaKey key) throws Exception |
| static PublicKey | getPublicKey (RsaKey key) throws Exception |
| static byte[] | signMd5Sha1 (byte[] md5sha1, RsaKey privateKey) |
| Signs an MD5/SHA-1 hash using a specified key. More... | |
| static boolean | verifyMd5Sha1 (byte[] md5sha1, byte[] signature, RsaKey publicKey) |
| Verifies an MD5/SHA-1 hash using a specified key and signature. More... | |
| static byte[] | signSha1 (byte[] sha1, RsaKey privateKey) |
| Signs a SHA-1 hash using a specified key. More... | |
| static boolean | verifySha1 (byte[] sha1, byte[] signature, RsaKey publicKey) |
| Verifies a signature using a specified key and SHA-1 hash. More... | |
| static byte[] | signSha256 (byte[] sha256, RsaKey privateKey) |
| Signs a SHA-256 hash using a specified key. More... | |
| static boolean | verifySha256 (byte[] sha256, byte[] signature, RsaKey publicKey) |
| Verifies a signature using a specified key and SHA-256 hash. More... | |
| static byte[] | encrypt (byte[] b, RsaKey publicKey) |
| Encrypts a value using a specified public key. More... | |
| static byte[] | decrypt (byte[] b, RsaKey privateKey) |
| Decrypts a value using a specified private key. More... | |
RSA-based cryptographic functions.
|
static |
Creates an RSA key.
|
static |
Creates an RSA key.
|
static |
Decrypts a value using a specified private key.
| b | The input byte array. |
| privateKey | The private key. |
|
static |
Encrypts a value using a specified public key.
| b | The input byte array. |
| publicKey | The public key. |
|
static |
|
static |
|
static |
|
static |
|
static |
Signs an MD5/SHA-1 hash using a specified key.
| md5sha1 | The MD5/SHA-1 hash. |
| privateKey | The private key. |
|
static |
Signs a SHA-1 hash using a specified key.
| sha1 | The SHA-1 hash. |
| privateKey | The private key. |
|
static |
Signs a SHA-256 hash using a specified key.
| sha256 | The SHA-256 hash. |
| privateKey | The private key. |
|
static |
Verifies an MD5/SHA-1 hash using a specified key and signature.
| md5sha1 | The MD5/SHA-1 hash. |
| signature | The input signature. |
| publicKey | The public key. |
true if the signature is valid; otherwise, false.
|
static |
Verifies a signature using a specified key and SHA-1 hash.
| sha1 | The SHA-1 hash. |
| signature | The input signature. |
| publicKey | The public key. |
true if the signature is valid; otherwise, false.
|
static |
Verifies a signature using a specified key and SHA-256 hash.
| sha256 | The SHA-256 hash. |
| signature | The input signature. |
| publicKey | The public key. |
true if the signature is valid; otherwise, false.