Class PaddedBufferedBlockCipher

java.lang.Object
org.bouncycastle.crypto.DefaultBufferedBlockCipher
org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher
All Implemented Interfaces:
BufferedBlockCipher

public class PaddedBufferedBlockCipher extends DefaultBufferedBlockCipher
A wrapper class that allows block ciphers to be used to process data in a piecemeal fashion with padding. The PaddedBufferedBlockCipher outputs a block only when the buffer is full and more data is being added, or on a doFinal (unless the current block in the buffer is a pad block). The default padding mechanism used is the one outlined in PKCS5/PKCS7.
  • Constructor Details

    • PaddedBufferedBlockCipher

      public PaddedBufferedBlockCipher(BlockCipher cipher, BlockCipherPadding padding)
      Create a buffered block cipher with the desired padding.
      Parameters:
      cipher - the underlying block cipher this buffering object wraps.
      padding - the padding type.
    • PaddedBufferedBlockCipher

      public PaddedBufferedBlockCipher(BlockCipher cipher)
      Create a buffered block cipher PKCS7 padding
      Parameters:
      cipher - the underlying block cipher this buffering object wraps.
  • Method Details