Top Description Fields Constructors Methods
org.bouncycastle.tls

public Class CombinedHash

extends Object
implements TlsHash
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.crypto.TlsHash
Imports
org.bouncycastle.tls.crypto.CryptoHashAlgorithm, .TlsCrypto, .TlsHash, org.bouncycastle.util.Arrays

A combined hash, which implements md5(m) || sha1(m).

Field Summary

Modifier and TypeField and Description
protected TlsContext
protected TlsCrypto
protected TlsHash
protected TlsHash

Constructor Summary

AccessConstructor and Description
pack-priv
CombinedHash(TlsContext context, TlsHash md5, TlsHash sha1)

public
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
calculateHash()

Implements org.bouncycastle.tls.crypto.TlsHash.calculateHash.

Return calculated hash for any input passed in.
public TlsHash
cloneHash()

Implements org.bouncycastle.tls.crypto.TlsHash.cloneHash.

Return a clone of this hash object representing its current state.
public void
reset()

Implements org.bouncycastle.tls.crypto.TlsHash.reset.

Reset the hash underlying this service.
public void
update(byte[]
input array containing the data.
input
,
int
offset into the input array the input starts at.
inOff
,
int
the length of the input data.
len
)

Implements org.bouncycastle.tls.crypto.TlsHash.update.

Update the hash with the passed in input.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
protected TlsContext context
cryptoback to summary
protected TlsCrypto crypto
md5back to summary
protected TlsHash md5
sha1back to summary
protected TlsHash sha1

Constructor Detail

CombinedHashback to summary
pack-priv CombinedHash(TlsContext context, TlsHash md5, TlsHash sha1)
CombinedHashback to summary
public CombinedHash(TlsCrypto crypto)
CombinedHashback to summary
public CombinedHash(CombinedHash t)

Method Detail

calculateHashback to summary
public byte[] calculateHash()

Implements org.bouncycastle.tls.crypto.TlsHash.calculateHash.

Doc from org.bouncycastle.tls.crypto.TlsHash.calculateHash.

Return calculated hash for any input passed in.

Returns:byte[]

the hash value.

cloneHashback to summary
public TlsHash cloneHash()

Implements org.bouncycastle.tls.crypto.TlsHash.cloneHash.

Doc from org.bouncycastle.tls.crypto.TlsHash.cloneHash.

Return a clone of this hash object representing its current state.

Returns:TlsHash

a clone of the current hash.

resetback to summary
public void reset()

Implements org.bouncycastle.tls.crypto.TlsHash.reset.

Doc from org.bouncycastle.tls.crypto.TlsHash.reset.

Reset the hash underlying this service.

updateback to summary
public void update(byte[] input, int inOff, int len)

Implements org.bouncycastle.tls.crypto.TlsHash.update.

Doc from org.bouncycastle.tls.crypto.TlsHash.update.

Update the hash with the passed in input.

Parameters
input:byte[]

input array containing the data.

inOff:int

offset into the input array the input starts at.

len:int

the length of the input data.