Пример #1
0
func (bloo fastSHA512State) Sum(goo []byte) []byte {
	abla := make([]byte, 512/8)
	C.sha512_done((*C.hash_state)(unsafe.Pointer(&bloo.scratch[0])),
		unsafe_bytes(abla))
	buf.Free(bloo.scratch)
	return append(goo, abla...)
}
Пример #2
0
func (bloo fastSHA512State) Reset() {
	abla := make([]byte, 512/8)
	C.sha512_done((*C.hash_state)(unsafe.Pointer(&bloo.scratch[0])),
		unsafe_bytes(abla))
}