net.i2p.crypto
Class SHA256Generator
java.lang.Object
net.i2p.crypto.SHA256Generator
- public final class SHA256Generator
- extends java.lang.Object
Defines a wrapper for SHA-256 operation
This is done. Takes data of any size and hashes it.
- Author:
- thecrypto,jrandom
Field Summary |
(package private) static int[] |
H0
|
(package private) static int[] |
K
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
K
static final int[] K
H0
static final int[] H0
SHA256Generator
public SHA256Generator(I2PAppContext context)
getInstance
public static final SHA256Generator getInstance()
cache
public final SHA256EntryCache cache()
getWordlength
public static final int getWordlength(int sourceLength)
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,
SHA256EntryCache.CacheEntry cache)
calculateHash
public final Hash calculateHash(byte[] source,
int start,
int len)
calculateHash
public final Hash calculateHash(byte[] source,
int start,
int len,
SHA256EntryCache.CacheEntry cache)