Package org.bouncycastle.jcajce.spec
Class SkeinParameterSpec.Builder
- java.lang.Object
-
- org.bouncycastle.jcajce.spec.SkeinParameterSpec.Builder
-
- Enclosing class:
- SkeinParameterSpec
public static class SkeinParameterSpec.Builder extends java.lang.ObjectA builder forSkeinParameterSpec.
-
-
Constructor Summary
Constructors Constructor Description Builder()Builder(SkeinParameterSpec params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SkeinParameterSpecbuild()Constructs a newSkeinParameterSpecinstance with the parameters provided to this builder.SkeinParameterSpec.Builderset(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 value 48 (reserved for message body).SkeinParameterSpec.BuildersetKey(byte[] key)Sets theSkeinParameterSpec.PARAM_TYPE_KEYparameter.SkeinParameterSpec.BuildersetKeyIdentifier(byte[] keyIdentifier)Sets theSkeinParameterSpec.PARAM_TYPE_KEY_IDENTIFIERparameter.SkeinParameterSpec.BuildersetNonce(byte[] nonce)Sets theSkeinParameterSpec.PARAM_TYPE_NONCEparameter.SkeinParameterSpec.BuildersetPersonalisation(byte[] personalisation)Sets theSkeinParameterSpec.PARAM_TYPE_PERSONALISATIONparameter.SkeinParameterSpec.BuildersetPersonalisation(java.util.Date date, java.lang.String emailAddress, java.lang.String distinguisher)Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.SkeinParameterSpec.BuildersetPersonalisation(java.util.Date date, java.util.Locale dateLocale, java.lang.String emailAddress, java.lang.String distinguisher)Implements the recommended personalisation format for Skein defined in Section 4.11 of the Skein 1.3 specification.SkeinParameterSpec.BuildersetPublicKey(byte[] publicKey)Sets theSkeinParameterSpec.PARAM_TYPE_KEY_IDENTIFIERparameter.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(SkeinParameterSpec params)
-
-
Method Detail
-
set
public SkeinParameterSpec.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 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.
- 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
public SkeinParameterSpec.Builder setKey(byte[] key)
Sets theSkeinParameterSpec.PARAM_TYPE_KEYparameter.
-
setPersonalisation
public SkeinParameterSpec.Builder setPersonalisation(byte[] personalisation)
Sets theSkeinParameterSpec.PARAM_TYPE_PERSONALISATIONparameter.
-
setPersonalisation
public SkeinParameterSpec.Builder setPersonalisation(java.util.Date date, java.lang.String emailAddress, java.lang.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 instance.
-
setPersonalisation
public SkeinParameterSpec.Builder setPersonalisation(java.util.Date date, java.util.Locale dateLocale, java.lang.String emailAddress, java.lang.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 instance.
-
setPublicKey
public SkeinParameterSpec.Builder setPublicKey(byte[] publicKey)
Sets theSkeinParameterSpec.PARAM_TYPE_KEY_IDENTIFIERparameter.- Returns:
- the current builder instance.
-
setKeyIdentifier
public SkeinParameterSpec.Builder setKeyIdentifier(byte[] keyIdentifier)
Sets theSkeinParameterSpec.PARAM_TYPE_KEY_IDENTIFIERparameter.- Returns:
- the current builder instance.
-
setNonce
public SkeinParameterSpec.Builder setNonce(byte[] nonce)
Sets theSkeinParameterSpec.PARAM_TYPE_NONCEparameter.- Returns:
- the current builder instance.
-
build
public SkeinParameterSpec build()
Constructs a newSkeinParameterSpecinstance with the parameters provided to this builder.
-
-