public class RSA_OAEP_256 extends Object
Modifier and Type | Method and Description |
---|---|
static SecretKey |
decryptCEK(RSAPrivateKey priv,
byte[] encryptedCEK)
Decrypts the specified encrypted Content Encryption Key (CEK).
|
static byte[] |
encryptCEK(RSAPublicKey pub,
SecretKey cek)
Encrypts the specified Content Encryption Key (CEK).
|
public static byte[] encryptCEK(RSAPublicKey pub, SecretKey cek)
pub
- The public RSA key. Must not be null
.cek
- The Content Encryption Key (CEK) to encrypt. Must not be null
.RuntimeException
- If encryption failed.public static SecretKey decryptCEK(RSAPrivateKey priv, byte[] encryptedCEK)
priv
- The private RSA key. Must not be null
.encryptedCEK
- The encrypted Content Encryption Key (CEK) to decrypt. Must not be null
.RuntimeException
- If decryption failed.Copyright © 2015. All rights reserved.