Ejemplo n.º 1
0
// New512 creates a new SHA3-512 hash.
// Its generic security strength is 512 bits against preimage attacks,
// and 256 bits against collision attacks.
func New512() hash.Hash {
	return cipher.NewHash(NewCipher512, 512/8)
}
Ejemplo n.º 2
0
// New384 creates a new SHA3-384 hash.
// Its generic security strength is 384 bits against preimage attacks,
// and 192 bits against collision attacks.
func New384() hash.Hash {
	return cipher.NewHash(NewCipher384, 384/8)
}
Ejemplo n.º 3
0
// New256 creates a new SHA3-256 hash.
// Its generic security strength is 256 bits against preimage attacks,
// and 128 bits against collision attacks.
func New256() hash.Hash {
	return cipher.NewHash(NewCipher256, 256/8)
}
Ejemplo n.º 4
0
// New224 creates a new SHA3-224 hash.
// Its generic security strength is 224 bits against preimage attacks,
// and 112 bits against collision attacks.
func New224() hash.Hash {
	return cipher.NewHash(NewCipher224, 224/8)
}
Ejemplo n.º 5
0
func newHashShake256() hash.Hash {
	return cipher.NewHash(NewShakeCipher256, 512)
}
Ejemplo n.º 6
0
// Internal-use instances of SHAKE used to test against KATs.
func newHashShake128() hash.Hash {
	return cipher.NewHash(NewShakeCipher128, 512)
}