Package org.mozilla.jss.pkcs12
Class SecretBag
java.lang.Object
org.mozilla.jss.pkcs12.SecretBag
- All Implemented Interfaces:
ASN1Value
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A Template class for decoding SecretBags from BER. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ANY
private OBJECT_IDENTIFIER
private SEQUENCE
private static final Tag
private static final SecretBag.Template
-
Constructor Summary
ConstructorsConstructorDescriptionSecretBag
(OBJECT_IDENTIFIER secretType, ASN1Value secret) Creates a SecretBag with the given secret type and secret. -
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.Returns the secret stored in the SecretBag.Returns the type of secret stored in the SecretBag.getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static SecretBag.Template
-
Field Details
-
secretType
-
secret
-
sequence
-
TAG
-
templateInstance
-
-
Constructor Details
-
SecretBag
Creates a SecretBag with the given secret type and secret. Neither may be null.
-
-
Method Details
-
getSecretType
Returns the type of secret stored in the SecretBag. -
getSecret
Returns the secret stored in the SecretBag. -
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
-