lukechampine / blake3

An AVX-512 accelerated implementation of the BLAKE3 cryptographic hash function
MIT License
352 stars 25 forks source link

possible for blake3 to have 224 bit version? #7

Closed gitmko0 closed 3 years ago

gitmko0 commented 3 years ago

possible for blake3 to have 224 bit version?

lukechampine commented 3 years ago

It's unusual for modern protocols to use 224-bit hashes, so I don't plan on adding a Sum224 function to this package, but you can easily implement it yourself:

func Sum224(b []byte) (out [28]byte) {
    h := blake3.New(28, nil)
    h.Write(b)
    h.Sum(out[:0])
    return
}