public class KeyEncryptionKey extends CryptoKey
Constructor and Description |
---|
KeyEncryptionKey(SecretBuilder builder)
Initialises the key with the given secret data.
|
Modifier and Type | Method and Description |
---|---|
Cipher |
getCipher()
Returns an initialized cipher object for an appropriate default algorithm and parameters.
|
Cipher |
getCipher(String algorithm)
Returns an initialized cipher object with default parameters.
|
Cipher |
getCipher(String algorithm,
AlgorithmParameters parameters)
Returns an initialized cipher object for the given algorithm and parameters.
|
Cipher |
getCipher(String algorithm,
AlgorithmParameterSpec parameterSpec)
Returns an initialized cipher object for the given algorithm and parameters.
|
allowsAlgorithm, close, export, getCertificate, getCertificate, getKeyAlgorithm, getKeyType, getKeyUsages, getPublicKey, getPublicKey, isExtractable
equals, getExpiryTime, getStableId, hashCode, isExpired, toString
public KeyEncryptionKey(SecretBuilder builder) throws NoSuchSecretException
builder
- the builder object.NoSuchSecretException
- if the raw secret cannot be extracted.public Cipher getCipher()
public Cipher getCipher(String algorithm, AlgorithmParameterSpec parameterSpec)
algorithm
- the cipher algorithm.parameterSpec
- the parameters to initialise the cipher with.public Cipher getCipher(String algorithm, AlgorithmParameters parameters)
algorithm
- the cipher algorithm.parameters
- the parameters to initialise the cipher with.Copyright © 2010-2018, ForgeRock All Rights Reserved.