Class SkeinParameters.Builder
- Namespace
- Org.BouncyCastle.Crypto.Parameters
- Assembly
- BouncyCastle.Cryptography.dll
A builder for SkeinParameters.
public class SkeinParameters.Builder
- Inheritance
-
SkeinParameters.Builder
- Inherited Members
Constructors
Builder()
public Builder()
Builder(SkeinParameters)
public Builder(SkeinParameters parameters)
Parameters
parametersSkeinParameters
Builder(IDictionary<int, byte[]>)
public Builder(IDictionary<int, byte[]> paramsMap)
Parameters
paramsMapIDictionary<int, byte[]>
Methods
Build()
Constructs a new SkeinParameters instance with the parameters provided to this builder.
public SkeinParameters Build()
Returns
Set(int, byte[])
Sets a parameters to apply to the Skein hash function.
public SkeinParameters.Builder Set(int type, byte[] value)
Parameters
typeintthe type of the parameter, in the range 5..62.
valuebyte[]the byte sequence of the parameter.
Returns
Remarks
Parameter types must be in the range 0,5..62, and cannot use the value 48 (reserved for message body).
Parameters with type < 48 are processed before the message content, parameters with type > 48 are processed after the message and prior to output.SetKey(byte[])
Sets the PARAM_TYPE_KEY parameter.
public SkeinParameters.Builder SetKey(byte[] key)
Parameters
keybyte[]
Returns
SetKeyIdentifier(byte[])
Sets the PARAM_TYPE_KEY_IDENTIFIER parameter.
public SkeinParameters.Builder SetKeyIdentifier(byte[] keyIdentifier)
Parameters
keyIdentifierbyte[]
Returns
SetNonce(byte[])
Sets the PARAM_TYPE_NONCE parameter.
public SkeinParameters.Builder SetNonce(byte[] nonce)
Parameters
noncebyte[]
Returns
SetPersonalisation(byte[])
Sets the PARAM_TYPE_PERSONALISATION parameter.
public SkeinParameters.Builder SetPersonalisation(byte[] personalisation)
Parameters
personalisationbyte[]
Returns
SetPersonalisation(DateTime, string, string)
Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.
public SkeinParameters.Builder SetPersonalisation(DateTime date, string emailAddress, string distinguisher)
Parameters
dateDateTimethe date the personalised application of the Skein was defined.
emailAddressstringthe email address of the creation of the personalised application.
distinguisherstringan arbitrary personalisation string distinguishing the application.
Returns
Remarks
The format is
YYYYMMDD email@address distinguisher, encoded to a byte
sequence using UTF-8 encoding.
SetPublicKey(byte[])
Sets the PARAM_TYPE_KEY_IDENTIFIER parameter.
public SkeinParameters.Builder SetPublicKey(byte[] publicKey)
Parameters
publicKeybyte[]