Bouncy Castle Cryptography Library 1.64

org.bouncycastle.crypto.tls
Class TlsBlockCipher

java.lang.Object
  extended byorg.bouncycastle.crypto.tls.TlsBlockCipher
All Implemented Interfaces:
TlsCipher

Deprecated. Migrate to the (D)TLS API in org.bouncycastle.tls (bctls jar).

public class TlsBlockCipher
extends java.lang.Object
implements TlsCipher

A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example.


Field Summary
protected  TlsContext context
          Deprecated.  
protected  BlockCipher decryptCipher
          Deprecated.  
protected  BlockCipher encryptCipher
          Deprecated.  
protected  boolean encryptThenMAC
          Deprecated.  
protected  byte[] randomData
          Deprecated.  
protected  TlsMac readMac
          Deprecated.  
protected  boolean useExplicitIV
          Deprecated.  
protected  TlsMac writeMac
          Deprecated.  
 
Constructor Summary
TlsBlockCipher(TlsContext context, BlockCipher clientWriteCipher, BlockCipher serverWriteCipher, Digest clientWriteDigest, Digest serverWriteDigest, int cipherKeySize)
          Deprecated.  
 
Method Summary
protected  int checkPaddingConstantTime(byte[] buf, int off, int len, int blockSize, int macSize)
          Deprecated.  
protected  int chooseExtraPadBlocks(java.security.SecureRandom r, int max)
          Deprecated.  
 byte[] decodeCiphertext(long seqNo, short type, byte[] ciphertext, int offset, int len)
          Deprecated.  
 byte[] encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len)
          Deprecated.  
 int getPlaintextLimit(int ciphertextLimit)
          Deprecated.  
 TlsMac getReadMac()
          Deprecated.  
 TlsMac getWriteMac()
          Deprecated.  
protected  int lowestBitSet(int x)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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. 
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. 

Bouncy Castle Cryptography Library 1.64