|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openuat.util.Hash
public class Hash
This is a small helper class that implements SHAd-256, a double execution of SHA256 to counter extension attacks. It is defined in Niels Ferguson, Bruce Schneier: Practical Cryptography, Wiley 2003
| Constructor Summary | |
|---|---|
Hash()
|
|
| Method Summary | |
|---|---|
static byte[] |
doubleSHA256(byte[] text,
boolean useJSSE)
This is a small utility function for computing a secure hash from the shared key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Hash()
| Method Detail |
|---|
public static byte[] doubleSHA256(byte[] text,
boolean useJSSE)
throws InternalApplicationException
text - The text to hash, it may be of arbitrary length.useJSSE - If set to true, the JSSE API with the default JCE provider of the JVM will be used
for cryptographic operations. If set to false, an internal copy of the Bouncycastle
Lightweight API classes will be used.
InternalApplicationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||