com.motorola.iden.provider
Class  SHA
java.lang.Object
  |
  +--com.motorola.iden.security.MessageDigestSpi
        |
        +--com.motorola.iden.security.MessageDigest
              |
              +--com.motorola.iden.provider.SHA
- public final class SHA
- extends MessageDigest
  
The SHA class is used to compute an SHA-1 message digest over arbitraty-sized
 data.
 
 MOTOROLA and the Stylized M Logo are registered trademarks of
 Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
 © Copyright 2002 - 2004 Motorola, Inc. All Rights Reserved.
 
- See Also: 
 [CipherSpi]
| 
Constructor Summary | 
SHA()
 
          Standard constructor, creates and initializes a new SHA instance. | 
 
| 
Method Summary | 
protected  byte[] | 
engineDigest()
 
          Completes the hash computation by performing final
 operations such as padding.  | 
protected  int | 
engineGetDigestLength()
 
          Return the digest length in bytes | 
protected  void | 
engineReset()
 
          Initializes (resets) the message digest. | 
protected  void | 
engineUpdate(byte b)
 
          Updates the digest using the specified byte. | 
protected  void | 
engineUpdate(byte[] input,
             int offset,
             int len)
 
          Updates the digest using the specified array of bytes,    
 starting at the specified offset. | 
protected  void | 
finalize()
 
            | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
SHA
public SHA()
- Standard constructor, creates and initializes a new SHA instance.
 
engineReset
protected void engineReset()
- Initializes (resets) the message digest.
- Overrides:
 engineReset in class MessageDigestSpi
 
 
engineGetDigestLength
protected int engineGetDigestLength()
- Return the digest length in bytes
- Overrides:
 engineGetDigestLength in class MessageDigestSpi
 
- Returns:
 - SHA digest length in bytes.
 
 
 
engineUpdate
protected void engineUpdate(byte b)
- Updates the digest using the specified byte.
- Overrides:
 engineUpdate in class MessageDigestSpi
 
- Parameters:
 b - the byte with which to update the digest.
 
 
engineUpdate
protected void engineUpdate(byte[] input,
                            int offset,
                            int len)
- Updates the digest using the specified array of bytes,    
 starting at the specified offset.
- Overrides:
 engineUpdate in class MessageDigestSpi
 
- Parameters:
 input - the array of bytes.offset - the offset to start from in the array of bytes.len - the number of bytes to be used, starting at 
 offset.
 
 
engineDigest
protected byte[] engineDigest()
- Completes the hash computation by performing final
 operations such as padding. Once 
engineDigest has 
 been called, the engine should be reset.
 Resetting is the responsibility of the
 engine implementor.
- Overrides:
 engineDigest in class MessageDigestSpi
 
- Returns:
 - the array of bytes for the resulting hash value.
 
 
 
finalize
protected void finalize()
- Overrides:
 finalize in class java.lang.Object