Inherits org::bouncycastle::jce::provider::WrapCipherSpi.
Public Member Functions | |
byte[] | wrap (Key wrappingKey, Key keyToBeWrapped) throws InvalidKeyException, IllegalBlockSizeException |
Temporarily expose internal wrapping functions till can make this a provider. | |
Key | unwrap (Key wrappingKey, byte[] wrappedKey, String wrappedKeyAlgorithm) throws InvalidKeyException, NoSuchAlgorithmException |
Temporarily expose internal unwrapping functions till can make this a provider. | |
Protected Attributes | |
SecureRandom | _random = new SecureRandom() |
In the short term, expose the wrap and unwrap functionality directly to allow it to be used without having to be signed.
byte [] org.ccnx.ccn.impl.security.crypto.jce.AESWrapWithPad.wrap | ( | Key | wrappingKey, | |
Key | keyToBeWrapped | |||
) | throws InvalidKeyException, IllegalBlockSizeException |
Temporarily expose internal wrapping functions till can make this a provider.
wrappingKey | key to use to wrap another key | |
keyToBeWrapped | key to be wrapped |
IllegalBlockSizeException | if the wrapped key or its padded version does not match the block size of the ciphar | |
InvalidKeyException | if the wrappingKey is invalid |
Key org.ccnx.ccn.impl.security.crypto.jce.AESWrapWithPad.unwrap | ( | Key | wrappingKey, | |
byte[] | wrappedKey, | |||
String | wrappedKeyAlgorithm | |||
) | throws InvalidKeyException, NoSuchAlgorithmException |
Temporarily expose internal unwrapping functions till can make this a provider.
wrappingKey | key to use to wrap another key | |
wrappedKey | key to be unwrapped | |
wrappedKeyAlgorithm | algorithm to decode wrappedKey into a key for |
InvalidKeyException | if the wrappingKey is invalid | |
NoSuchAlgorithmException | if the wrappedKeyAlgorithm is unknown. Thrown only in older versions of BouncyCastle, here for compatibility. (Later versions catch it and rethrow as an InvalidKeyException, which we do upstream from here. Can't do it here or we'd hit an unthrown exception error when running against newer BouncyCastle libraries.) |