Top Description Fields Constructors Methods
org.bouncycastle.tls.crypto.impl.jcajce

public Class JcaTlsHash

extends Object
implements TlsHash
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.crypto.TlsHash
Imports
java.security.MessageDigest, org.bouncycastle.tls.crypto.TlsHash

Wrapper class for providing support methods for a TlsHash based on the JCA MessageDigest class.

Field Summary

Modifier and TypeField and Description
private final MessageDigest

Constructor Summary

AccessConstructor and Description
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.
data
,
int
offset into the input array the input starts at.
offSet
,
int
the length of the input data.
length
)

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

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

Field Detail

digestback to summary
private final MessageDigest digest

Constructor Detail

JcaTlsHashback to summary
public JcaTlsHash(MessageDigest digest)

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[] data, int offSet, int length)

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

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

Update the hash with the passed in input.

Parameters
data:byte[]

input array containing the data.

offSet:int

offset into the input array the input starts at.

length:int

the length of the input data.