org.mozilla.jss.crypto
Class EncryptionAlgorithm

java.lang.Object
  |
  +--org.mozilla.jss.crypto.Algorithm
        |
        +--org.mozilla.jss.crypto.EncryptionAlgorithm

public class EncryptionAlgorithm
extends Algorithm

An algorithm for performing symmetric encryption.


Field Summary
static EncryptionAlgorithm DES_CBC
           
static EncryptionAlgorithm DES_CBC_PAD
           
static EncryptionAlgorithm DES_ECB
           
static EncryptionAlgorithm DES3_CBC
           
static EncryptionAlgorithm DES3_CBC_PAD
           
static EncryptionAlgorithm DES3_ECB
           
static EncryptionAlgorithm RC2_CBC
           
static EncryptionAlgorithm RC4
           
 
Method Summary
static EncryptionAlgorithm fromOID(OBJECT_IDENTIFIER oid)
           
 int getBlockSize()
          The blocksize of the algorithm in bytes.
 int getIVLength()
          Returns the number of bytes that this algorithm expects in its initialization vector.
 boolean isPadded()
          Returns true if this algorithm performs padding.
 
Methods inherited from class org.mozilla.jss.crypto.Algorithm
getParameterClass, toOID, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RC4

public static final EncryptionAlgorithm RC4

DES_ECB

public static final EncryptionAlgorithm DES_ECB

DES_CBC

public static final EncryptionAlgorithm DES_CBC

DES_CBC_PAD

public static final EncryptionAlgorithm DES_CBC_PAD

DES3_ECB

public static final EncryptionAlgorithm DES3_ECB

DES3_CBC

public static final EncryptionAlgorithm DES3_CBC

DES3_CBC_PAD

public static final EncryptionAlgorithm DES3_CBC_PAD

RC2_CBC

public static final EncryptionAlgorithm RC2_CBC
Method Detail

fromOID

public static EncryptionAlgorithm fromOID(OBJECT_IDENTIFIER oid)
                                   throws java.security.NoSuchAlgorithmException

getBlockSize

public int getBlockSize()
The blocksize of the algorithm in bytes. Stream algorithms (such as RC4) have a blocksize of 1.

isPadded

public boolean isPadded()
Returns true if this algorithm performs padding.

getIVLength

public int getIVLength()
Returns the number of bytes that this algorithm expects in its initialization vector.
Returns:
The size in bytes of the IV for this algorithm. A size of 0 means this algorithm does not take an IV.