C# Class Org.BouncyCastle.Crypto.Tls.TlsBlockCipher

A generic TLS 1.0 block cipher. This can be used for AES or 3DES for example.
Inheritance: TlsCipher
Mostrar archivo Open project: mapo80/iTextSharp-Monotouch

Protected Properties

Property Type Description
context TlsClientContext
decryptCipher IBlockCipher
encryptCipher IBlockCipher
rMac TlsMac
wMac TlsMac

Public Methods

Method Description
DecodeCiphertext ( Org.BouncyCastle.Crypto.Tls.ContentType type, byte ciphertext, int offset, int len ) : byte[]
EncodePlaintext ( Org.BouncyCastle.Crypto.Tls.ContentType type, byte plaintext, int offset, int len ) : byte[]
TlsBlockCipher ( TlsClientContext context, IBlockCipher encryptCipher, IBlockCipher decryptCipher, IDigest writeDigest, IDigest readDigest, int cipherKeySize ) : System

Protected Methods

Method Description
ChooseExtraPadBlocks ( SecureRandom r, int max ) : int
CreateKeyParameter ( byte buf, int &off, int len ) : KeyParameter
CreateParametersWithIV ( KeyParameter key, byte buf, int &off, int len ) : ParametersWithIV
CreateTlsMac ( IDigest digest, byte buf, int &off ) : TlsMac

Private Methods

Method Description
LowestBitSet ( uint x ) : int

Method Details

ChooseExtraPadBlocks() protected method

protected ChooseExtraPadBlocks ( SecureRandom r, int max ) : int
r Org.BouncyCastle.Security.SecureRandom
max int
return int

CreateKeyParameter() protected method

protected CreateKeyParameter ( byte buf, int &off, int len ) : KeyParameter
buf byte
off int
len int
return Org.BouncyCastle.Crypto.Parameters.KeyParameter

CreateParametersWithIV() protected method

protected CreateParametersWithIV ( KeyParameter key, byte buf, int &off, int len ) : ParametersWithIV
key Org.BouncyCastle.Crypto.Parameters.KeyParameter
buf byte
off int
len int
return Org.BouncyCastle.Crypto.Parameters.ParametersWithIV

CreateTlsMac() protected method

protected CreateTlsMac ( IDigest digest, byte buf, int &off ) : TlsMac
digest IDigest
buf byte
off int
return TlsMac

DecodeCiphertext() public method

public DecodeCiphertext ( Org.BouncyCastle.Crypto.Tls.ContentType type, byte ciphertext, int offset, int len ) : byte[]
type Org.BouncyCastle.Crypto.Tls.ContentType
ciphertext byte
offset int
len int
return byte[]

EncodePlaintext() public method

public EncodePlaintext ( Org.BouncyCastle.Crypto.Tls.ContentType type, byte plaintext, int offset, int len ) : byte[]
type Org.BouncyCastle.Crypto.Tls.ContentType
plaintext byte
offset int
len int
return byte[]

TlsBlockCipher() public method

public TlsBlockCipher ( TlsClientContext context, IBlockCipher encryptCipher, IBlockCipher decryptCipher, IDigest writeDigest, IDigest readDigest, int cipherKeySize ) : System
context TlsClientContext
encryptCipher IBlockCipher
decryptCipher IBlockCipher
writeDigest IDigest
readDigest IDigest
cipherKeySize int
return System

Property Details

context protected_oe property

protected TlsClientContext context
return TlsClientContext

decryptCipher protected_oe property

protected IBlockCipher decryptCipher
return IBlockCipher

encryptCipher protected_oe property

protected IBlockCipher encryptCipher
return IBlockCipher

rMac protected_oe property

protected TlsMac,Org.BouncyCastle.Crypto.Tls rMac
return TlsMac

wMac protected_oe property

protected TlsMac,Org.BouncyCastle.Crypto.Tls wMac
return TlsMac