()
| 285 | func BenchmarkSha3_512_1MiB(b *testing.B) { benchmarkHash(b, New512(), 1024, 1024) } |
| 286 | |
| 287 | func Example_sum() { |
| 288 | buf := []byte("some data to hash") |
| 289 | // A hash needs to be 64 bytes long to have 256-bit collision resistance. |
| 290 | h := make([]byte, 64) |
| 291 | // Compute a 64-byte hash of buf and put it in h. |
| 292 | ShakeSum256(h, buf) |
| 293 | fmt.Printf("%x\n", h) |
| 294 | // Output: 0f65fe41fc353e52c55667bb9e2b27bfcc8476f2c413e9437d272ee3194a4e3146d05ec04a25d16b8f577c19b82d16b1424c3e022e783d2b4da98de3658d363d |
| 295 | } |
| 296 | |
| 297 | func Example_mac() { |
| 298 | k := []byte("this is a secret key; you should generate a strong random key that's at least 32 bytes long") |
nothing calls this directly
no test coverage detected