public class MacGenerator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALG_STRING_3DES
Deprecated.
Protects profiles with Tripple DES symmetric encryption.
|
static java.lang.String |
ALG_STRING_CAST
Deprecated.
Protects profiles with CAST symmetric encryption (the default).
|
static java.lang.String |
ALG_STRING_DES
Deprecated.
Protects profiles with DES symmetric encryption.
|
static java.lang.String |
ALG_STRING_IDEA
Deprecated.
Protects profiles with IDEA symmetric encryption.
|
| Constructor and Description |
|---|
MacGenerator()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
generate(java.lang.String alg,
java.security.Key macKey,
byte[] message)
Deprecated.
Generates a MAC given a key and the message to MAC.
|
static byte[] |
generate(java.lang.String alg,
java.security.Key macKey,
byte[] message,
java.security.spec.AlgorithmParameterSpec p)
Deprecated.
Generates a MAC given a key, the message to MAC, and an
AlgorithmParameterSpec (containing an init vector). |
public static final java.lang.String ALG_STRING_CAST
public static final java.lang.String ALG_STRING_DES
public static final java.lang.String ALG_STRING_3DES
public static final java.lang.String ALG_STRING_IDEA
public static byte[] generate(java.lang.String alg,
java.security.Key macKey,
byte[] message,
java.security.spec.AlgorithmParameterSpec p)
throws javax.crypto.NoSuchPaddingException,
java.security.NoSuchAlgorithmException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.ShortBufferException
AlgorithmParameterSpec (containing an init vector).
macKey - the key to use for message authenticationmessage - the message to authenticatep - the parameters to pass to the cipherjavax.crypto.NoSuchPaddingExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.InvalidKeyExceptionjavax.crypto.ShortBufferExceptionpublic static byte[] generate(java.lang.String alg,
java.security.Key macKey,
byte[] message)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException,
javax.crypto.ShortBufferException
macKey - the key to use for message authenticationmessage - the message to authenticatejava.security.NoSuchAlgorithmExceptionjavax.crypto.NoSuchPaddingExceptionjava.security.InvalidAlgorithmParameterExceptionjava.security.InvalidKeyExceptionjavax.crypto.ShortBufferException