Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
abstract class: SymmetricCipher [javadoc | source]

Direct Known Subclasses:
    DESedeCrypt, AESCrypt, RC2Crypt, BlowfishCrypt, DESCrypt

This abstract class represents the core of all block ciphers. It allows to intialize the cipher and encrypt/decrypt single blocks. Larger quantities are handled by modes, which are subclasses of FeedbackCipher.
Method from com.sun.crypto.provider.SymmetricCipher Summary:
decryptBlock,   encryptBlock,   getBlockSize,   init
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.SymmetricCipher Detail:
 abstract  void decryptBlock(byte[] cipher,
    int cipherOffset,
    byte[] plain,
    int plainOffset)
    Decrypt one cipher block.

    The input cipher, starting at cipherOffset and ending at (cipherOffset+blockSize-1), is decrypted. The result is stored in plain, starting at plainOffset.

 abstract  void encryptBlock(byte[] plain,
    int plainOffset,
    byte[] cipher,
    int cipherOffset)
    Encrypt one cipher block.

    The input plain, starting at plainOffset and ending at (plainOffset+blockSize-1), is encrypted. The result is stored in cipher, starting at cipherOffset.

 abstract int getBlockSize()
    Retrieves this cipher's block size.
 abstract  void init(boolean decrypting,
    String algorithm,
    byte[] key) throws InvalidKeyException
    Initializes the cipher in the specified mode with the given key.