| 
 | Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
   oracle.stellent.wcm.common.encode.Sha1
oracle.stellent.wcm.common.encode.Sha1
public final class Sha1
Note: this code is based on the code supplied gotten from Chuck McManis created on 5 Oct 1996 from the URL http://professionals.com/~cmcmanis//java/ Based on the C code that Steve Reid wrote his header was : SHA-1 in C By Steve Reid <steve@edmweb.com> 100% Public Domain Test Vectors (from FIPS PUB 180-1) "abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F This is a simple port of Steve Reid's SHA-1 code into Java. I've run his test vectors through the code and they all pass.
| Field Summary | |
|---|---|
| protected  int[] | m_block | 
| protected  int | m_blockIndex | 
| protected  long | m_count | 
| protected  int[] | m_ddWorking variables. | 
|  byte[] | m_digestBits | 
|  boolean | m_digestValid | 
| protected  int[] | m_state | 
| Constructor Summary | |
|---|---|
| Sha1() | |
| Method Summary | |
|---|---|
|  void | computeDigest(byte[] source)Complete digest computation on an array of bytes. | 
|  void | finish()Complete processing on the message digest. | 
|  void | init()Initialize new context | 
|  void | update(byte b)Add one byte to the digest. | 
|  void | update(byte[] input)Add an array of bytes to the digest. | 
|  void | update(byte[] input, int offset, int len)Add specific bytes to the digest. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public byte[] m_digestBits
public boolean m_digestValid
protected int[] m_state
protected long m_count
protected int[] m_block
protected int m_blockIndex
protected int[] m_dd
| Constructor Detail | 
|---|
public Sha1()
| Method Detail | 
|---|
public void update(byte[] input,
                   int offset,
                   int len)
public void update(byte[] input)
public void computeDigest(byte[] source)
public void init()
public void update(byte b)
public void finish()
| 
 | Oracle® WebCenter Content Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-03 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||