Modifier and Type | Field and Description |
---|---|
static int |
HMAC256
The HMAC 256 bit variant.
|
static int |
HMAC384
The HMAC 384 bit variant.
|
static int |
HMAC512
The HMAC 512 bit variant.
|
Constructor and Description |
---|
SiHmac(byte[] key,
int bits)
Ctor.
|
SiHmac(String key)
Ctor.
|
SiHmac(String key,
int bits)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
bitlength()
Signature bit length.
|
byte[] |
sign(byte[] data)
Create signature for data bytes.
|
public static final int HMAC256
public static final int HMAC384
public static final int HMAC512
public SiHmac(String key)
key
- The encryption keypublic SiHmac(String key, int bits)
key
- The encryption keybits
- The signature bit lengthpublic SiHmac(byte[] key, int bits)
key
- The encryption keybits
- The signature bit lengthpublic byte[] sign(byte[] data) throws IOException
Signature
sign
in interface Signature
data
- The data to be signedIOException
- If anything failspublic int bitlength()
Copyright © 2015–2019 Take. All rights reserved.