JSS 3.1

org.mozilla.jss.pkix.primitive
Class PBEParameter

java.lang.Object
  |
  +--org.mozilla.jss.pkix.primitive.PBEParameter

public class PBEParameter
extends java.lang.Object
implements 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.


Inner Class Summary
static class PBEParameter.Template
          A template class for decoding a PBEParameter.
 
Field Summary
private  int iterations
           
private  byte[] salt
           
private  SEQUENCE sequence
           
private static Tag TAG
           
private static PBEParameter.Template templateInstance
           
 
Constructor Summary
private PBEParameter()
           
  PBEParameter(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
 void encode(java.io.OutputStream ostream)
           
 void encode(Tag implicitTag, java.io.OutputStream ostream)
           
 int getIterations()
           
 byte[] getSalt()
           
 Tag getTag()
           
static PBEParameter.Template getTemplate()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

salt

private byte[] salt

iterations

private int iterations

sequence

private SEQUENCE sequence

TAG

private static final Tag TAG

templateInstance

private static final PBEParameter.Template templateInstance
Constructor Detail

PBEParameter

private PBEParameter()

PBEParameter

public PBEParameter(byte[] salt,
                    int iterations)
Creates a PBEParameter from a salt and iteration count. Neither may be null.

PBEParameter

public PBEParameter(OCTET_STRING salt,
                    INTEGER iterations)
Creates a PBEParameter from a salt and iteration count. Neither may be null.
Method Detail

getSalt

public byte[] getSalt()

getIterations

public int getIterations()

getTag

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

encode

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

encode

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

getTemplate

public static PBEParameter.Template getTemplate()

JSS 3.1