Package org.mozilla.jss.pkix.primitive
Class PBEParameter
java.lang.Object
org.mozilla.jss.pkix.primitive.PBEParameter
- All Implemented Interfaces:
ASN1Value
PKCS #5 PBEParameter, and PKCS #12 pkcs-12PbeParams. The only
difference between the two is that PKCS #5 dictates that the size of the
salt must be 8 bytes, while PKCS #12 leaves the salt length undefined.
To work with both standards, this class does not check the length of the
salt but rather leaves that to the application.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A template class for decoding a PBEParameter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private byte[]
private SEQUENCE
private static final Tag
private static final PBEParameter.Template
-
Constructor Summary
ConstructorsConstructorDescriptionPBEParameter
(byte[] salt, int iterations) Creates a PBEParameter from a salt and iteration count.PBEParameter
(OCTET_STRING salt, INTEGER iterations) Creates a PBEParameter from a salt and iteration count. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.int
byte[]
getSalt()
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static PBEParameter.Template
-
Field Details
-
salt
private byte[] salt -
iterations
private int iterations -
sequence
-
TAG
-
templateInstance
-
-
Constructor Details
-
PBEParameter
public PBEParameter(byte[] salt, int iterations) Creates a PBEParameter from a salt and iteration count. Neither may be null. -
PBEParameter
Creates a PBEParameter from a salt and iteration count. Neither may be null.
-
-
Method Details
-
getSalt
public byte[] getSalt() -
getIterations
public int getIterations() -
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
getTemplate
-