|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.crypto.AbstractDigest
net.rim.device.api.crypto.NullDigest
public final class NullDigest
Allows for a user to provide a digest with no functionality to a function that requires a digest. It is provided for instances when no digest is required initially and further in the protocol or application a new digest is required. The methods in this class do not perform any operations. For information on cryptographic algorithms, see Crypto Algorithms.
NullEncryptor,
NullDecryptor| Constructor Summary | ||
|---|---|---|
|
NullDigest()
This constructor is not used. |
|
| Method Summary | ||
|---|---|---|
|
String |
getAlgorithm()
Returns the name of this digest, "Null" in this case. |
|
int |
getDigest(byte[] buffer,
int offset,
boolean resetDigest)
Returns zero (0) specifying that no information was hashed and that there is no information to return from the null digest. |
|
int |
getDigestLength()
Returns zero (0), since this is a null digest with a length of zero. |
|
void |
reset()
Reinitializes the digest. |
|
void |
update(byte[] data,
int offset,
int length)
Passes a byte array of data, specified by the length and offset, into the hash algorithm. |
|
void |
update(int data)
Passes a single byte into the hash algorithm. |
| Methods inherited from class net.rim.device.api.crypto.AbstractDigest |
|---|
getBlockLength, getDigest, getDigest, getDigest, 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.Digest |
|---|
getBlockLength, getDigest, getDigest, getDigest, update |
| Constructor Detail |
|---|
public NullDigest()
| Method Detail |
|---|
public String getAlgorithm()
getAlgorithm in interface DigestgetAlgorithm in class AbstractDigestpublic void reset()
AbstractDigest
reset in interface Digestreset in class AbstractDigestpublic void update(int data)
AbstractDigest
update in interface Digestupdate in class AbstractDigestdata - The byte to be hashed.
public void update(byte[] data,
int offset,
int length)
AbstractDigest
update in interface Digestupdate in class AbstractDigestdata - The array containing the input data.offset - The offset of the input data.length - The length of the input data.public int getDigestLength()
getDigestLength in interface DigestgetDigestLength in class AbstractDigest
public int getDigest(byte[] buffer,
int offset,
boolean resetDigest)
getDigest in interface DigestgetDigest in class AbstractDigestbuffer - Ignored.offset - Ignored.resetDigest - Ignored.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.