@ThreadSafe public class RSA_OAEP_256 extends Object
Modifier and Type | Method and Description |
---|---|
static SecretKey |
decryptCEK(PrivateKey priv,
byte[] encryptedCEK,
Provider provider)
Decrypts the specified encrypted Content Encryption Key (CEK).
|
static byte[] |
encryptCEK(RSAPublicKey pub,
SecretKey cek,
Provider provider)
Encrypts the specified Content Encryption Key (CEK).
|
public static byte[] encryptCEK(RSAPublicKey pub, SecretKey cek, Provider provider) throws JOSEException
pub
- The public RSA key. Must not be null
.cek
- The Content Encryption Key (CEK) to encrypt. Must
not be null
.provider
- The JCA provider, or null
to use the default
one.JOSEException
- If encryption failed.public static SecretKey decryptCEK(PrivateKey priv, byte[] encryptedCEK, Provider provider) throws JOSEException
priv
- The private RSA key. Must not be null
.encryptedCEK
- The encrypted Content Encryption Key (CEK) to
decrypt. Must not be null
.provider
- The JCA provider, or null
to use the
default one.JOSEException
- If decryption failed.Copyright © 2020 Connect2id Ltd.. All rights reserved.