public class OpenSSLHMAC
extends java.lang.Object
implements org.bouncycastle.crypto.Mac
Modifier and Type | Field and Description |
---|---|
static int |
SHA1
The algorithm of the SHA-1 cryptographic hash function/digest.
|
Constructor and Description |
---|
OpenSSLHMAC(int digestAlgorithm)
Initializes a new OpenSSLHMAC instance with a specific digest
algorithm.
|
Modifier and Type | Method and Description |
---|---|
int |
doFinal(byte[] out,
int outOff) |
protected void |
finalize() |
java.lang.String |
getAlgorithmName() |
int |
getMacSize() |
void |
init(org.bouncycastle.crypto.CipherParameters params) |
void |
reset() |
void |
update(byte in) |
void |
update(byte[] in,
int off,
int len) |
public static final int SHA1
public OpenSSLHMAC(int digestAlgorithm)
digestAlgorithm
- the algorithm of the digest to initialize the new
instance withSHA1
public int doFinal(byte[] out, int outOff) throws org.bouncycastle.crypto.DataLengthException, java.lang.IllegalStateException
doFinal
in interface org.bouncycastle.crypto.Mac
org.bouncycastle.crypto.DataLengthException
java.lang.IllegalStateException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String getAlgorithmName()
getAlgorithmName
in interface org.bouncycastle.crypto.Mac
public int getMacSize()
getMacSize
in interface org.bouncycastle.crypto.Mac
public void init(org.bouncycastle.crypto.CipherParameters params) throws java.lang.IllegalArgumentException
init
in interface org.bouncycastle.crypto.Mac
java.lang.IllegalArgumentException
public void reset()
reset
in interface org.bouncycastle.crypto.Mac
public void update(byte in) throws java.lang.IllegalStateException
update
in interface org.bouncycastle.crypto.Mac
java.lang.IllegalStateException
public void update(byte[] in, int off, int len) throws org.bouncycastle.crypto.DataLengthException, java.lang.IllegalStateException
update
in interface org.bouncycastle.crypto.Mac
org.bouncycastle.crypto.DataLengthException
java.lang.IllegalStateException
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.