github.com/hashicorp/vault/sdk@v0.11.0/helper/cryptoutil/cryptoutil_test.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package cryptoutil
     5  
     6  import "testing"
     7  
     8  func TestBlake2b256Hash(t *testing.T) {
     9  	hashVal := Blake2b256Hash("sampletext")
    10  
    11  	if string(hashVal) == "" || string(hashVal) == "sampletext" {
    12  		t.Fatalf("failed to hash the text")
    13  	}
    14  }