Package ch.bitagent.bitcoin.lib.helper
Class Hash
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.helper.Hash
-
public class Hash extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static IntSIGHASH_ALLConstantSIGHASH_ALLstatic IntSIGHASH_NONEConstantSIGHASH_NONEstatic IntSIGHASH_SINGLEConstantSIGHASH_SINGLE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]hash160(byte[] bytes)sha256 followed by ripemd160static byte[]hash256(byte[] bytes)two rounds of sha256static MachmacS256Init(byte[] key)hmacS256Init.static MachmacS512Init(byte[] key)hmacS512Init.static byte[]sha1(byte[] bytes)sha1.static byte[]sha256(byte[] bytes)sha256.
-
-
-
Method Detail
-
sha1
public static byte[] sha1(byte[] bytes)
sha1.
- Parameters:
bytes- an array ofbyteobjects- Returns:
- an array of
byteobjects
-
sha256
public static byte[] sha256(byte[] bytes)
sha256.
- Parameters:
bytes- an array ofbyteobjects- Returns:
- an array of
byteobjects
-
hash160
public static byte[] hash160(byte[] bytes)
sha256 followed by ripemd160- Parameters:
bytes- an array ofbyteobjects- Returns:
- an array of
byteobjects
-
hash256
public static byte[] hash256(byte[] bytes)
two rounds of sha256- Parameters:
bytes- an array ofbyteobjects- Returns:
- an array of
byteobjects
-
hmacS256Init
public static Mac hmacS256Init(byte[] key)
hmacS256Init.
- Parameters:
key- an array ofbyteobjects- Returns:
- a
Macobject
-
-