Top Inners Constructors Methods
org.bouncycastle.crypto.general

pack-priv abstract Class GuardedKeyWrapOperatorFactory<T extends Parameters, K extends Key>

extends Object
implements KeyWrapOperatorFactory<T extends Parameters, K extends Key>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.KeyWrapOperatorFactory
Known Direct Subclasses
org.bouncycastle.crypto.general.RC2.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.SEED.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.Serpent.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.TripleDES.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.Twofish.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.AES.KeyWrapOperatorFactory, org.bouncycastle.crypto.general.Camellia.KeyWrapOperatorFactory
Imports
java.security.SecureRandom, org.bouncycastle.crypto.Algorithm, .CryptoServicesRegistrar, .InvalidWrappingException, .Key, .KeyUnwrapper, .KeyWrapOperatorFactory, .KeyWrapper, .KeyWrapperUsingSecureRandom, .Parameters, org.bouncycastle.crypto.fips.FipsStatus, .FipsUnapprovedOperationError, org.bouncycastle.crypto.internal.Wrapper

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public KeyUnwrapper<T>
createKeyUnwrapper(K
the key to initialize the un-wrapper with.
key
,
T
the parameters to initialize the un-wrapper with.
parameters
)

Implements org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyUnwrapper.

Create a key un-wrapper using the passed in key and parameters.
public KeyWrapper<T>
createKeyWrapper(K
the key to initialize the wrapper with.
key
,
T
the parameters to initialize the wrapper with.
parameters
)

Implements org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyWrapper.

Create a key wrapper using the passed in key and parameters.
protected abstract Wrapper
createWrapper(boolean forWrapping, K key, T parameters, SecureRandom random)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

GuardedKeyWrapOperatorFactoryback to summary
pack-priv GuardedKeyWrapOperatorFactory()

Method Detail

createKeyUnwrapperback to summary
public KeyUnwrapper<T> createKeyUnwrapper(K key, T parameters)

Implements org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyUnwrapper.

Doc from org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyUnwrapper.

Create a key un-wrapper using the passed in key and parameters.

Parameters
key:K

the key to initialize the un-wrapper with.

parameters:T

the parameters to initialize the un-wrapper with.

Returns:KeyUnwrapper<T>

an initialized key un-wrapper.

createKeyWrapperback to summary
public KeyWrapper<T> createKeyWrapper(K key, T parameters)

Implements org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyWrapper.

Doc from org.bouncycastle.crypto.KeyWrapOperatorFactory.createKeyWrapper.

Create a key wrapper using the passed in key and parameters.

Parameters
key:K

the key to initialize the wrapper with.

parameters:T

the parameters to initialize the wrapper with.

Returns:KeyWrapper<T>

an initialized key wrapper.

createWrapperback to summary
protected abstract Wrapper createWrapper(boolean forWrapping, K key, T parameters, SecureRandom random)
org.bouncycastle.crypto.general back to summary

private Class GuardedKeyWrapOperatorFactory.GuardedUnwrapper

extends Object
implements KeyUnwrapper<T extends Parameters>
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.crypto.general.GuardedKeyWrapOperatorFactory.GuardedUnwrapper
All Implemented Interfaces
org.bouncycastle.crypto.KeyUnwrapper

Field Summary

Modifier and TypeField and Description
private final Algorithm
private final T
private final Wrapper

Constructor Summary

AccessConstructor and Description
pack-priv
GuardedUnwrapper(Algorithm algorithm, T parameters, Wrapper wrapper)

Method Summary

Modifier and TypeMethod and Description
public T
getParameters()

Implements org.bouncycastle.crypto.KeyUnwrapper.getParameters.

Return the parameters for this un-wrapper.
public byte[]
unwrap(byte[]
input data array.
in
,
int
offset into data array wrapped key starts at.
inOff
,
int
length of wrapped key data.
inLen
)

Implements org.bouncycastle.crypto.KeyUnwrapper.unwrap.

Return the unwrapped byte encoding of a key.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmback to summary
private final Algorithm algorithm
parametersback to summary
private final T parameters
wrapperback to summary
private final Wrapper wrapper

Constructor Detail

GuardedUnwrapperback to summary
pack-priv GuardedUnwrapper(Algorithm algorithm, T parameters, Wrapper wrapper)

Method Detail

getParametersback to summary
public T getParameters()

Implements org.bouncycastle.crypto.KeyUnwrapper.getParameters.

Doc from org.bouncycastle.crypto.KeyUnwrapper.getParameters.

Return the parameters for this un-wrapper.

Returns:T

the un-wrapper's parameters.

unwrapback to summary
public byte[] unwrap(byte[] in, int inOff, int inLen) throws InvalidWrappingException

Implements org.bouncycastle.crypto.KeyUnwrapper.unwrap.

Doc from org.bouncycastle.crypto.KeyUnwrapper.unwrap.

Return the unwrapped byte encoding of a key.

Parameters
in:byte[]

input data array.

inOff:int

offset into data array wrapped key starts at.

inLen:int

length of wrapped key data.

Returns:byte[]

the unwrapped byte encoding of the key.

Exceptions
InvalidWrappingException:
if the wrapping cannot be processed.
org.bouncycastle.crypto.general back to summary

private Class GuardedKeyWrapOperatorFactory.GuardedWrapper

extends Object
implements KeyWrapperUsingSecureRandom<T extends Parameters>
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.crypto.general.GuardedKeyWrapOperatorFactory.GuardedWrapper
All Implemented Interfaces
org.bouncycastle.crypto.KeyWrapperUsingSecureRandom, org.bouncycastle.crypto.OperatorUsingSecureRandom, org.bouncycastle.crypto.KeyWrapper

Field Summary

Modifier and TypeField and Description
private final Algorithm
private final K
private final T
private final SecureRandom
private Wrapper

Constructor Summary

AccessConstructor and Description
pack-priv
GuardedWrapper(K key, T parameters, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public T
getParameters()

Implements org.bouncycastle.crypto.KeyWrapper.getParameters.

Return the parameters for this wrapper.
pack-priv void
public KeyWrapperUsingSecureRandom<T>
withSecureRandom(SecureRandom
the SecureRandom to use.
random
)

Implements org.bouncycastle.crypto.KeyWrapperUsingSecureRandom.withSecureRandom.

Return a variant of this signer using the passed in random as its source of randomness.
public byte[]
wrap(byte[]
input data array.
in
,
int
offset into data array key data starts at.
inOff
,
int
length of key data.
inLen
)

Implements org.bouncycastle.crypto.KeyWrapper.wrap.

Return the wrapped version of a key byte encoding.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

algorithmback to summary
private final Algorithm algorithm
keyback to summary
private final K key
parametersback to summary
private final T parameters
randomback to summary
private final SecureRandom random
wrapperback to summary
private Wrapper wrapper

Constructor Detail

GuardedWrapperback to summary
pack-priv GuardedWrapper(K key, T parameters, SecureRandom random)

Method Detail

getParametersback to summary
public T getParameters()

Implements org.bouncycastle.crypto.KeyWrapper.getParameters.

Doc from org.bouncycastle.crypto.KeyWrapper.getParameters.

Return the parameters for this wrapper.

Returns:T

the wrapper's parameters.

setUpback to summary
pack-priv void setUp()
withSecureRandomback to summary
public KeyWrapperUsingSecureRandom<T> withSecureRandom(SecureRandom random)

Implements org.bouncycastle.crypto.KeyWrapperUsingSecureRandom.withSecureRandom.

Doc from org.bouncycastle.crypto.KeyWrapperUsingSecureRandom.withSecureRandom.

Return a variant of this signer using the passed in random as its source of randomness.

Parameters
random:SecureRandom

the SecureRandom to use.

Returns:KeyWrapperUsingSecureRandom<T>

a signer which will use random where random data is required.

wrapback to summary
public byte[] wrap(byte[] in, int inOff, int inLen)

Implements org.bouncycastle.crypto.KeyWrapper.wrap.

Doc from org.bouncycastle.crypto.KeyWrapper.wrap.

Return the wrapped version of a key byte encoding.

Parameters
in:byte[]

input data array.

inOff:int

offset into data array key data starts at.

inLen:int

length of key data.

Returns:byte[]

the wrapped encoding of the key.