Bouncy Castle Cryptography Library 1.49

org.bouncycastle.crypto.tls
Class TlsNullCipher

java.lang.Object
  extended by org.bouncycastle.crypto.tls.TlsNullCipher
All Implemented Interfaces:
TlsCipher

public class TlsNullCipher
extends java.lang.Object
implements TlsCipher

A NULL CipherSuite with optional MAC


Field Summary
protected  TlsContext context
           
protected  TlsMac readMac
           
protected  TlsMac writeMac
           
 
Constructor Summary
TlsNullCipher(TlsContext context)
           
TlsNullCipher(TlsContext context, Digest clientWriteDigest, Digest serverWriteDigest)
           
 
Method Summary
 byte[] decodeCiphertext(long seqNo, short type, byte[] ciphertext, int offset, int len)
           
 byte[] encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len)
           
 int getPlaintextLimit(int ciphertextLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected TlsContext context

writeMac

protected TlsMac writeMac

readMac

protected TlsMac readMac
Constructor Detail

TlsNullCipher

public TlsNullCipher(TlsContext context)

TlsNullCipher

public TlsNullCipher(TlsContext context,
                     Digest clientWriteDigest,
                     Digest serverWriteDigest)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getPlaintextLimit

public int getPlaintextLimit(int ciphertextLimit)
Specified by:
getPlaintextLimit in interface TlsCipher

encodePlaintext

public byte[] encodePlaintext(long seqNo,
                              short type,
                              byte[] plaintext,
                              int offset,
                              int len)
                       throws java.io.IOException
Specified by:
encodePlaintext in interface TlsCipher
Throws:
java.io.IOException

decodeCiphertext

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

Bouncy Castle Cryptography Library 1.49