Top Description Fields Constructors Methods
org.bouncycastle.tls

pack-priv Class DeferredHash

extends Object
implements TlsHandshakeHash
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsHandshakeHash, org.bouncycastle.tls.crypto.TlsHash
Imports
java.io.IOException, .OutputStream, java.util.Enumeration, .Hashtable, org.bouncycastle.tls.crypto.CryptoHashAlgorithm, .TlsHash, org.bouncycastle.util.Integers

Buffers input until the hash algorithm is determined.

Field Summary

Modifier and TypeField and Description
private DigestInputBuffer
protected static final int
protected TlsContext
private boolean
private Hashtable<K, V>
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Integer
box(int cryptoHashAlgorithm)

public byte[]
calculateHash()

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

Return calculated hash for any input passed in.
protected void
protected void
checkTrackingHash(int cryptoHashAlgorithm)

protected void
checkTrackingHash(Integer cryptoHashAlgorithm)

public TlsHash
cloneHash()

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

Return a clone of this hash object representing its current state.
protected TlsHash
cloneHash(int cryptoHashAlgorithm)

protected TlsHash
cloneHash(Integer cryptoHashAlgorithm)

protected void
cloneHash(Hashtable<K, V> newHashes, int cryptoHashAlgorithm)

protected void
cloneHash(Hashtable<K, V> newHashes, Integer cryptoHashAlgorithm)

public void
public void
public TlsHash
public byte[]
public void
public void
reset()

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

Reset the hash underlying this service.
public void
public void
public void
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

bufback to summary
private DigestInputBuffer buf
BUFFERING_HASH_LIMITback to summary
protected static final int BUFFERING_HASH_LIMIT
contextback to summary
protected TlsContext context
forceBufferingback to summary
private boolean forceBuffering
hashesback to summary
private Hashtable<K, V> hashes
sealedback to summary
private boolean sealed

Constructor Detail

DeferredHashback to summary
pack-priv DeferredHash(TlsContext context)

Method Detail

boxback to summary
protected Integer box(int cryptoHashAlgorithm)
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.

checkStopBufferingback to summary
protected void checkStopBuffering()
checkTrackingHashback to summary
protected void checkTrackingHash(int cryptoHashAlgorithm)
checkTrackingHashback to summary
protected void checkTrackingHash(Integer cryptoHashAlgorithm)
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.

cloneHashback to summary
protected TlsHash cloneHash(int cryptoHashAlgorithm)
cloneHashback to summary
protected TlsHash cloneHash(Integer cryptoHashAlgorithm)
cloneHashback to summary
protected void cloneHash(Hashtable<K, V> newHashes, int cryptoHashAlgorithm)
cloneHashback to summary
protected void cloneHash(Hashtable<K, V> newHashes, Integer cryptoHashAlgorithm)
copyBufferToback to summary
public void copyBufferTo(OutputStream output) throws IOException

Implements org.bouncycastle.tls.TlsHandshakeHash.copyBufferTo.

forceBufferingback to summary
public void forceBuffering()

Implements org.bouncycastle.tls.TlsHandshakeHash.forceBuffering.

forkPRFHashback to summary
public TlsHash forkPRFHash()

Implements org.bouncycastle.tls.TlsHandshakeHash.forkPRFHash.

getFinalHashback to summary
public byte[] getFinalHash(int cryptoHashAlgorithm)

Implements org.bouncycastle.tls.TlsHandshakeHash.getFinalHash.

notifyPRFDeterminedback to summary
public void notifyPRFDetermined()

Implements org.bouncycastle.tls.TlsHandshakeHash.notifyPRFDetermined.

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.

sealHashAlgorithmsback to summary
public void sealHashAlgorithms()

Implements org.bouncycastle.tls.TlsHandshakeHash.sealHashAlgorithms.

stopTrackingback to summary
public void stopTracking()

Implements org.bouncycastle.tls.TlsHandshakeHash.stopTracking.

trackHashAlgorithmback to summary
public void trackHashAlgorithm(int cryptoHashAlgorithm)

Implements org.bouncycastle.tls.TlsHandshakeHash.trackHashAlgorithm.

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.