|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.crypto.AbstractMAC
|
+--net.rim.device.api.crypto.NullMAC
The NullMAC class implements a trivial algorithm (as in none). The methods
in this class do not perform any operations on the given data.
For information on cryptographic algorithms, see Crypto Algorithms.
| Constructor Summary | ||
|
NullMAC()
Creates a new NullMAC object. |
|
|
NullMAC(boolean checkMAC)
Creates a new NullMAC object. |
|
| Method Summary | ||
|
boolean |
checkMAC(byte[] mac,
int offset)
Returns true or false depending on how this object was constructed. |
|
String |
getAlgorithm()
Returns the name of this digest, "Null" since this is the null MAC. |
|
int |
getLength()
Returns the length in bytes of the MAC, zero in this case. |
|
int |
getMAC(byte[] buffer,
int offset,
boolean reset)
Gets the null MAC by returning zero. |
|
void |
reset()
Reinitializes the MAC. |
|
void |
update(byte[] data,
int offset,
int length)
Feeds more data into the MAC algorithm. |
| Methods inherited from class net.rim.device.api.crypto.AbstractMAC |
checkMAC, checkMAC, checkMAC, getMAC, getMAC, getMAC, update, update |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.rim.device.api.crypto.MAC |
checkMAC, checkMAC, checkMAC, getMAC, getMAC, getMAC, update, update |
| Constructor Detail |
public NullMAC()
NullMAC object.
Note that this will default to returning true in the checkMAC method.
public NullMAC(boolean checkMAC)
NullMAC object.
This constructor takes in a boolean that will be returned by the checkMAC method. This allows for an application to define exactly how it thinks the checkMAC method should work conceptually.
checkMAC - The boolean that will be
returned by the checkMAC method.| Method Detail |
public boolean checkMAC(byte[] mac,
int offset)
checkMAC in interface MACcheckMAC in class AbstractMACmac - The byte array containing the mac data.offset - The offset of the mac data.public String getAlgorithm()
getAlgorithm in interface MACgetAlgorithm in class AbstractMACpublic int getLength()
getLength in interface MACgetLength in class AbstractMAC
MAC
public int getMAC(byte[] buffer,
int offset,
boolean reset)
getMAC in interface MACgetMAC in class AbstractMACbuffer - Igorned.offset - Ignored.
public void reset()
MACreset in interface MACreset in class AbstractMAC
MACCryptoTokenException - Thrown if an error occurs with the crypto
token or the crypto token is invalid.
public void update(byte[] data,
int offset,
int length)
MACupdate in interface MACupdate in class AbstractMAC
MACdata - The array containing the input data.offset - The offset, or initial position, of the data within the array.length - The length of the input data, in bytes.CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 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.