18 lines
286 B
Go
18 lines
286 B
Go
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package keys
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestSHA256Hashing(t *testing.T) {
|
|
t.Parallel()
|
|
hasher := NewSHA256Hashing()
|
|
|
|
hashed := hasher.Hash([]byte("test"))
|
|
assert.Regexp(t, "^\\$sha256\\$.*", hashed)
|
|
}
|