Package org.bouncycastle.crypto.params
Class SkeinParameters
java.lang.Object
org.bouncycastle.crypto.params.SkeinParameters
- All Implemented Interfaces:
CipherParameters
Parameters for the Skein hash function - a series of byte[] strings identified by integer tags.
Parameterised Skein can be used for:
- MAC generation, by providing a
key
. - Randomised hashing, by providing a
nonce
. - A hash function for digital signatures, associating a
public key
with the message digest. - A key derivation function, by providing a
key identifier
. - Personalised hashing, by providing a
recommended format
orarbitrary
personalisation string.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The parameter type for the Skein configuration block: 4.static final int
The parameter type for a secret key, supporting MAC or KDF functions: 0.static final int
The parameter type for a key identifier string: 16.static final int
The parameter type for the message: 48.static final int
The parameter type for a nonce: 20.static final int
The parameter type for the output transformation: 63.static final int
The parameter type for a personalisation string: 8.static final int
The parameter type for a public key: 12. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getKey()
Obtains the value of thekey parameter
, ornull
if not set.byte[]
Obtains the value of thekey identifier parameter
, ornull
if not set.byte[]
getNonce()
Obtains the value of thenonce parameter
, ornull
if not set.Obtains a map of type (Integer) to value (byte[]) for the parameters tracked in this object.byte[]
Obtains the value of thepersonalisation parameter
, ornull
if not set.byte[]
Obtains the value of thepublic key parameter
, ornull
if not set.
-
Field Details
-
PARAM_TYPE_KEY
public static final int PARAM_TYPE_KEYThe parameter type for a secret key, supporting MAC or KDF functions: 0.- See Also:
-
PARAM_TYPE_CONFIG
public static final int PARAM_TYPE_CONFIGThe parameter type for the Skein configuration block: 4.- See Also:
-
PARAM_TYPE_PERSONALISATION
public static final int PARAM_TYPE_PERSONALISATIONThe parameter type for a personalisation string: 8.- See Also:
-
PARAM_TYPE_PUBLIC_KEY
public static final int PARAM_TYPE_PUBLIC_KEYThe parameter type for a public key: 12.- See Also:
-
PARAM_TYPE_KEY_IDENTIFIER
public static final int PARAM_TYPE_KEY_IDENTIFIERThe parameter type for a key identifier string: 16.- See Also:
-
PARAM_TYPE_NONCE
public static final int PARAM_TYPE_NONCEThe parameter type for a nonce: 20.- See Also:
-
PARAM_TYPE_MESSAGE
public static final int PARAM_TYPE_MESSAGEThe parameter type for the message: 48.- See Also:
-
PARAM_TYPE_OUTPUT
public static final int PARAM_TYPE_OUTPUTThe parameter type for the output transformation: 63.- See Also:
-
-
Constructor Details
-
SkeinParameters
public SkeinParameters()
-
-
Method Details
-
getParameters
Obtains a map of type (Integer) to value (byte[]) for the parameters tracked in this object. -
getKey
public byte[] getKey()Obtains the value of thekey parameter
, ornull
if not set. -
getPersonalisation
public byte[] getPersonalisation()Obtains the value of thepersonalisation parameter
, ornull
if not set. -
getPublicKey
public byte[] getPublicKey()Obtains the value of thepublic key parameter
, ornull
if not set. -
getKeyIdentifier
public byte[] getKeyIdentifier()Obtains the value of thekey identifier parameter
, ornull
if not set. -
getNonce
public byte[] getNonce()Obtains the value of thenonce parameter
, ornull
if not set.
-