net.i2p.crypto
Class SHA256Generator

java.lang.Object
  extended by net.i2p.crypto.SHA256Generator

public final class SHA256Generator
extends java.lang.Object

Defines a wrapper for SHA-256 operation. All the good stuff occurs in the GNU-Crypto Sha256Standalone


Constructor Summary
SHA256Generator(I2PAppContext context)
           
 
Method Summary
 Hash calculateHash(byte[] source)
          Calculate the SHA-256 has of the source
 Hash calculateHash(byte[] source, int start, int len)
           
 void calculateHash(byte[] source, int start, int len, byte[] out, int outOffset)
           
static SHA256Generator getInstance()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHA256Generator

public SHA256Generator(I2PAppContext context)
Method Detail

getInstance

public static final SHA256Generator getInstance()

calculateHash

public final Hash calculateHash(byte[] source)
Calculate the SHA-256 has of the source

Parameters:
source - what to hash
Returns:
hash of the source

calculateHash

public final Hash calculateHash(byte[] source,
                                int start,
                                int len)

calculateHash

public final void calculateHash(byte[] source,
                                int start,
                                int len,
                                byte[] out,
                                int outOffset)

main

public static void main(java.lang.String[] args)