Class TlsBlockCipher

  • All Implemented Interfaces:
    TlsCipher

    public class TlsBlockCipher
    extends java.lang.Object
    implements TlsCipher
    Deprecated.
    Migrate to the (D)TLS API in org.bouncycastle.tls (bctls jar).
    A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.
    • Field Detail

      • context

        protected TlsContext context
        Deprecated.
      • randomData

        protected byte[] randomData
        Deprecated.
      • useExplicitIV

        protected boolean useExplicitIV
        Deprecated.
      • encryptThenMAC

        protected boolean encryptThenMAC
        Deprecated.
      • encryptCipher

        protected BlockCipher encryptCipher
        Deprecated.
      • decryptCipher

        protected BlockCipher decryptCipher
        Deprecated.
      • writeMac

        protected TlsMac writeMac
        Deprecated.
      • readMac

        protected TlsMac readMac
        Deprecated.
    • Constructor Detail

      • TlsBlockCipher

        public TlsBlockCipher​(TlsContext context,
                              BlockCipher clientWriteCipher,
                              BlockCipher serverWriteCipher,
                              Digest clientWriteDigest,
                              Digest serverWriteDigest,
                              int cipherKeySize)
                       throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException
    • Method Detail

      • getWriteMac

        public TlsMac getWriteMac()
        Deprecated.
      • getReadMac

        public TlsMac getReadMac()
        Deprecated.
      • getPlaintextLimit

        public int getPlaintextLimit​(int ciphertextLimit)
        Deprecated.
        Specified by:
        getPlaintextLimit in interface TlsCipher
      • encodePlaintext

        public byte[] encodePlaintext​(long seqNo,
                                      short type,
                                      byte[] plaintext,
                                      int offset,
                                      int len)
        Deprecated.
        Specified by:
        encodePlaintext in interface TlsCipher
      • decodeCiphertext

        public byte[] decodeCiphertext​(long seqNo,
                                       short type,
                                       byte[] ciphertext,
                                       int offset,
                                       int len)
                                throws java.io.IOException
        Deprecated.
        Specified by:
        decodeCiphertext in interface TlsCipher
        Throws:
        java.io.IOException
      • checkPaddingConstantTime

        protected int checkPaddingConstantTime​(byte[] buf,
                                               int off,
                                               int len,
                                               int blockSize,
                                               int macSize)
        Deprecated.
      • chooseExtraPadBlocks

        protected int chooseExtraPadBlocks​(java.security.SecureRandom r,
                                           int max)
        Deprecated.
      • lowestBitSet

        protected int lowestBitSet​(int x)
        Deprecated.