github.com/hashicorp/vault/sdk@v0.11.0/helper/cryptoutil/cryptoutil.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package cryptoutil 5 6 import "golang.org/x/crypto/blake2b" 7 8 func Blake2b256Hash(key string) []byte { 9 hf, _ := blake2b.New256(nil) 10 11 hf.Write([]byte(key)) 12 13 return hf.Sum(nil) 14 }