java.lang.Object
edu.iu.client.IuJsonBuilder<JweRecipientBuilder.EncryptedKeyBuilder>
iu.crypt.CertificateReferenceBuilder<JweRecipientBuilder.EncryptedKeyBuilder>
iu.crypt.KeyReferenceBuilder<JweRecipientBuilder.EncryptedKeyBuilder>
iu.crypt.JoseBuilder<JweRecipientBuilder.EncryptedKeyBuilder>
iu.crypt.JweRecipientBuilder.EncryptedKeyBuilder
- All Implemented Interfaces:
WebCertificateReference.Builder<JweRecipientBuilder.EncryptedKeyBuilder>
,WebCryptoHeader.Builder<JweRecipientBuilder.EncryptedKeyBuilder>
,WebKeyReference.Builder<JweRecipientBuilder.EncryptedKeyBuilder>
- Enclosing class:
JweRecipientBuilder
class JweRecipientBuilder.EncryptedKeyBuilder
extends JoseBuilder<JweRecipientBuilder.EncryptedKeyBuilder>
Handles ephemeral key-protection parameters.
-
Method Summary
Modifier and TypeMethodDescription(package private) byte[]
agreedUponKey
(WebEncryption.Encryption encryption) Computes the agreed-upon key for the Elliptic Curve Diffie-Hellman algorithm.(package private) WebKey.Algorithm
Gets the algorithm(package private) JweRecipient
encrypt
(WebEncryption.Encryption encryption, byte[] contentEncryptionKey) Generates the encrypted key and creates the recipient.(package private) byte[]
Gets the passphrase-derived key to use with PBKDF2 key derivation defined by PKCS#5.Methods inherited from class iu.crypt.JoseBuilder
contentType, copy, crit, key, key, param, param, param, type, wellKnown, wellKnown
Methods inherited from class iu.crypt.KeyReferenceBuilder
algorithm, keyId
Methods inherited from class edu.iu.client.IuJsonBuilder
build, param, paramNames, toJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.iu.crypt.WebCertificateReference.Builder
cert, cert, pem, pem, x5t, x5t256
Methods inherited from interface edu.iu.crypt.WebCryptoHeader.Builder
keyId
-
Method Details
-
algorithm
WebKey.Algorithm algorithm()Gets the algorithm- Returns:
- algorithm
-
agreedUponKey
Computes the agreed-upon key for the Elliptic Curve Diffie-Hellman algorithm.- Parameters:
encryption
- encryption algorithm- Returns:
- agreed-upon key
- See Also:
-
passphraseDerivedKey
byte[] passphraseDerivedKey()Gets the passphrase-derived key to use with PBKDF2 key derivation defined by PKCS#5.- Returns:
- 128-bit derived key data suitable for use with AESWrap
-
encrypt
Generates the encrypted key and creates the recipient.- Parameters:
encryption
- content encryption algorithmcontentEncryptionKey
- supplies an ephemeral content encryption key if needed- Returns:
- recipient
-