public class SSL3Mac extends java.lang.Object implements org.bouncycastle.crypto.Mac, TlsHMAC
H(K + opad, H(K + ipad, text))
Constructor and Description |
---|
SSL3Mac(org.bouncycastle.crypto.Digest digest)
Base constructor for one of the standard digest algorithms that the byteLength of
the algorithm is know for.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateMAC()
Return calculated MAC for any input passed in.
|
int |
doFinal(byte[] out,
int outOff) |
java.lang.String |
getAlgorithmName() |
int |
getInternalBlockSize()
Return the internal block size for the message digest underlying this HMAC service.
|
int |
getMacLength()
Return the length of the MAC generated by this service.
|
int |
getMacSize() |
org.bouncycastle.crypto.Digest |
getUnderlyingDigest() |
void |
init(org.bouncycastle.crypto.CipherParameters params) |
void |
reset()
Reset the mac generator.
|
void |
setKey(byte[] key)
Set the key to be used by the MAC implementation supporting this service.
|
void |
update(byte in) |
void |
update(byte[] in,
int inOff,
int len)
Update the MAC with the passed in input.
|
public SSL3Mac(org.bouncycastle.crypto.Digest digest)
digest
- the digest.public java.lang.String getAlgorithmName()
getAlgorithmName
in interface org.bouncycastle.crypto.Mac
public org.bouncycastle.crypto.Digest getUnderlyingDigest()
public void init(org.bouncycastle.crypto.CipherParameters params)
init
in interface org.bouncycastle.crypto.Mac
public int getMacSize()
getMacSize
in interface org.bouncycastle.crypto.Mac
public void update(byte in)
update
in interface org.bouncycastle.crypto.Mac
public void setKey(byte[] key)
TlsMAC
public void update(byte[] in, int inOff, int len)
TlsMAC
public byte[] calculateMAC()
TlsMAC
calculateMAC
in interface TlsMAC
public int getInternalBlockSize()
TlsHMAC
getInternalBlockSize
in interface TlsHMAC
public int getMacLength()
TlsMAC
getMacLength
in interface TlsMAC
public int doFinal(byte[] out, int outOff)
doFinal
in interface org.bouncycastle.crypto.Mac