public class HelixParameterSpec extends Object implements AlgorithmParameterSpec
Constructor and Description |
---|
HelixParameterSpec(byte[] nonce)
Creates a new HelixParameterSpec instance using bytes from
nonce as the Helix nonce.
|
HelixParameterSpec(byte[] nonce,
byte[] expectedMac)
Creates a new HelixParameterSpec instance using bytes from
nonce and expectedMac as the Helix nonce and
MAC, respectively.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getMac()
Returns the MAC used to authenticate a message.
|
byte[] |
getNonce()
Returns the nonce used in a Helix cryptographic operation.
|
public HelixParameterSpec(byte[] nonce)
nonce
- a 16-byte array whose contents will be copied for use as the
Helix nonce (i.e. initialization vector) in an
encryption or decryption operationNullPointerException
- if nonce is nullIllegalArgumentException
- if nonce is not exactly 16 bytes in lengthpublic HelixParameterSpec(byte[] nonce, byte[] expectedMac)
nonce
- a 16-byte array whose contents will be copied for use as the
Helix nonce (i.e. initialization vector) in an
encryption or decryption operationexpectedMac
- a 16-byte array whose contents will be copied for use as the
Helix MAC to authenticate a messageNullPointerException
- if either nonce or expectedMac is nullIllegalArgumentException
- if either nonce or expectedMac is not
exactly 16 bytes in lengthpublic byte[] getNonce()
public byte[] getMac()
Copyright © 2010-2015 Matthew Zipay. All Rights Reserved.