Documentation ¶
Index ¶
- Constants
- type FakeHasher
- func (f *FakeHasher) BatchHash(msg [][]byte) (hash []byte, err error)
- func (f *FakeHasher) BlockSize() int
- func (f *FakeHasher) Hash(msg []byte) (hash []byte, err error)
- func (f *FakeHasher) Reset()
- func (f *FakeHasher) Size() int
- func (f *FakeHasher) Sum(b []byte) []byte
- func (f *FakeHasher) Write(p []byte) (n int, err error)
- type HashType
- type Hasher
- func (h *Hasher) BatchHash(msg [][]byte) (hash []byte, err error)
- func (h *Hasher) BlockSize() int
- func (h *Hasher) Hash(msg []byte) (hash []byte, err error)
- func (h *Hasher) HashBuffer(msg []byte, buf []byte) (hash []byte, err error)
- func (h *Hasher) Reset()
- func (h *Hasher) Size() int
- func (h *Hasher) Sum(b []byte) []byte
- func (h *Hasher) Write(p []byte) (n int, err error)
Constants ¶
View Source
const ( //SHA1 sha1 SHA1 HashType = 0x10 SHA2 HashType = 0x20 SHA3 HashType = 0x30 KECCAK HashType = 0x40 Size224 HashType = 0x01 Size256 HashType = 0x00 Size384 HashType = 0x02 Size512 HashType = 0x03 //SHA2_224 sha2 with 224bits SHA2_224 = SHA2 | Size224 //SHA2_256 sha2 with 224bits SHA2_256 = SHA2 | Size256 //SHA2_384 sha2 with 384bits SHA2_384 = SHA2 | Size384 //SHA2_512 sha2 with 512bits SHA2_512 = SHA2 | Size512 //SHA3_224 sha3 with 224bits SHA3_224 = SHA3 | Size224 //SHA3_256 sha3 with 256bits SHA3_256 = SHA3 | Size256 //SHA3_384 sha3 with 384bits SHA3_384 = SHA3 | Size384 //SHA3_512 sha3 with 512bits SHA3_512 = SHA3 | Size512 //KECCAK_224 KECCAK with 224bits KECCAK_224 = KECCAK | Size224 //KECCAK_256 KECCAK with 256bits KECCAK_256 = KECCAK | Size256 //KECCAK_384 KECCAK with 384bits KECCAK_384 = KECCAK | Size384 //KECCAK_512 KECCAK with 512bits KECCAK_512 = KECCAK | Size512 )
nolint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeHasher ¶
type FakeHasher struct {
// contains filtered or unexported fields
}
FakeHasher thw return value of function FakeHasher
func (*FakeHasher) BatchHash ¶
func (f *FakeHasher) BatchHash(msg [][]byte) (hash []byte, err error)
BatchHash hash with two-dimensional array
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher thw return value of function NewHasher
func (*Hasher) HashBuffer ¶
HashBuffer is identical to Hash except that it stages through the provided buffer (if one is required) rather than allocating a temporary one. If buf is nil or has un-expected size, one fix-sized bytes will be allocated.
Click to show internal directories.
Click to hide internal directories.