Package org.bouncycastle.crypto.params
Class SkeinParameters.Builder
java.lang.Object
org.bouncycastle.crypto.params.SkeinParameters.Builder
- Enclosing class:
SkeinParameters
A builder for
SkeinParameters.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs a newSkeinParametersinstance with the parameters provided to this builder.set(int type, byte[] value) Sets a parameters to apply to the Skein hash function.
Parameter types must be in the range 0,5..62, and cannot use the valueSkeinParameters.PARAM_TYPE_MESSAGE(reserved for message body).setKey(byte[] key) Sets theSkeinParameters.PARAM_TYPE_KEYparameter.setKeyIdentifier(byte[] keyIdentifier) Sets theSkeinParameters.PARAM_TYPE_KEY_IDENTIFIERparameter.setNonce(byte[] nonce) Sets theSkeinParameters.PARAM_TYPE_NONCEparameter.setPersonalisation(byte[] personalisation) Sets theSkeinParameters.PARAM_TYPE_PERSONALISATIONparameter.setPersonalisation(Date date, String emailAddress, String distinguisher) Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.setPersonalisation(Date date, Locale dateLocale, String emailAddress, String distinguisher) Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.setPublicKey(byte[] publicKey) Sets theSkeinParameters.PARAM_TYPE_KEY_IDENTIFIERparameter.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
Builder
-
-
Method Details
-
set
Sets a parameters to apply to the Skein hash function.
Parameter types must be in the range 0,5..62, and cannot use the valueSkeinParameters.PARAM_TYPE_MESSAGE(reserved for message body).Parameters with type <
SkeinParameters.PARAM_TYPE_MESSAGEare processed before the message content, parameters with type >SkeinParameters.PARAM_TYPE_MESSAGEare processed after the message and prior to output.- Parameters:
type- the type of the parameter, in the range 5..62.value- the byte sequence of the parameter.- Returns:
- the current builder instance.
-
setKey
Sets theSkeinParameters.PARAM_TYPE_KEYparameter. -
setPersonalisation
Sets theSkeinParameters.PARAM_TYPE_PERSONALISATIONparameter. -
setPersonalisation
public SkeinParameters.Builder setPersonalisation(Date date, String emailAddress, String distinguisher) Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.The format is
YYYYMMDD email@address distinguisher, encoded to a byte sequence using UTF-8 encoding.- Parameters:
date- the date the personalised application of the Skein was defined.emailAddress- the email address of the creation of the personalised application.distinguisher- an arbitrary personalisation string distinguishing the application.- Returns:
- the current builder.
-
setPersonalisation
public SkeinParameters.Builder setPersonalisation(Date date, Locale dateLocale, String emailAddress, String distinguisher) Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification. You may need to use this method if the default locale doesn't use a Gregorian calender so that the GeneralizedTime produced is compatible implementations.The format is
YYYYMMDD email@address distinguisher, encoded to a byte sequence using UTF-8 encoding.- Parameters:
date- the date the personalised application of the Skein was defined.dateLocale- locale to be used for date interpretation.emailAddress- the email address of the creation of the personalised application.distinguisher- an arbitrary personalisation string distinguishing the application.- Returns:
- the current builder.
-
setPublicKey
Sets theSkeinParameters.PARAM_TYPE_KEY_IDENTIFIERparameter. -
setKeyIdentifier
Sets theSkeinParameters.PARAM_TYPE_KEY_IDENTIFIERparameter. -
setNonce
Sets theSkeinParameters.PARAM_TYPE_NONCEparameter. -
build
Constructs a newSkeinParametersinstance with the parameters provided to this builder.
-