|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.crypto.MACFactory
Creates a Message Authentication Code MAC using the specified parameters.
For more information on the cryptographic algorithms supported by this factory, see Crypto Algorithms.
MAC,
SymmetricKeyFactory| Constructor Summary |
| Method Summary | ||
|
static Enumeration |
getAlgorithms()
Returns an Enumeration of String representing all of the
registered algorithms with this factory. |
|
static MAC |
getInstance(String algorithm,
SymmetricKey key)
Constructs and returns a new MAC.
|
|
static MAC |
getInstance(SymmetricKey key)
Constructs and returns a new MAC. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
| Method Detail |
public static MAC getInstance(SymmetricKey key) throws NoSuchAlgorithmException, CryptoTokenException, CryptoUnsupportedOperationException
MAC. A
MACFactory object
is selected based on key.getAlgorithm(), eg an HMAC key will return an HMAC object, and a DES key will return
a CBCMAC object.key - The key used to extract the key data from.NoSuchAlgorithmException - Thrown if the MAC cannot be constructed.CryptoTokenException - Thrown if an error occurs with the crypto
token or the crypto token is invalid.CryptoUnsupportedOperationException - Thrown if a call is made to
an unsupported operation.public static MAC getInstance(String algorithm, SymmetricKey key) throws NoSuchAlgorithmException, CryptoTokenException, CryptoUnsupportedOperationException
MAC.
A MACFactory object is selected based on the String alone.
The keydata will simply be extracted from the symmetric key.
algorithm - A String containing the specified MAC algorithm. e.g. "HMAC/SHA1", "CBCMAC/DES"key - The key used to extract key data from.NoSuchAlgorithmException - Thrown if the MAC cannot be constructed.CryptoTokenException - Thrown if an error occurs with the crypto
token or the crypto token is invalid.CryptoUnsupportedOperationException - Thrown if a call is made to
an unsupported operation.public static Enumeration getAlgorithms()
String representing all of the
registered algorithms with this factory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.