org.mozilla.jss.pkcs12

Class SecretBag

Implemented Interfaces:
ASN1Value

public class SecretBag
extends java.lang.Object
implements ASN1Value

Nested Class Summary

static class
SecretBag.Template
A Template class for decoding SecretBags from BER.

Constructor Summary

SecretBag(OBJECT_IDENTIFIER secretType, ASN1Value secret)
Creates a SecretBag with the given secret type and secret.

Method Summary

void
encode(OutputStream ostream)
void
encode(Tag implicitTag, OutputStream ostream)
ANY
getSecret()
Returns the secret stored in the SecretBag.
OBJECT_IDENTIFIER
getSecretType()
Returns the type of secret stored in the SecretBag.
Tag
getTag()
static SecretBag.Template
getTemplate()

Constructor Details

SecretBag

public SecretBag(OBJECT_IDENTIFIER secretType,
                 ASN1Value secret)
Creates a SecretBag with the given secret type and secret. Neither may be null.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

getSecret

public ANY getSecret()
Returns the secret stored in the SecretBag.

getSecretType

public OBJECT_IDENTIFIER getSecretType()
Returns the type of secret stored in the SecretBag.

getTag

public Tag getTag()
Specified by:
getTag in interface ASN1Value

getTemplate

public static SecretBag.Template getTemplate()