go-crypt/crypt/checksum_test.go
Claude 8498ecf890
feat: extract crypto/security packages from core/go
ChaCha20-Poly1305, AES-256-GCM, Argon2 key derivation, OpenPGP
challenge-response auth, and trust tier policy engine.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:25:54 +00:00

23 lines
562 B
Go

package crypt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSHA256Sum_Good(t *testing.T) {
data := []byte("hello")
expected := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
result := SHA256Sum(data)
assert.Equal(t, expected, result)
}
func TestSHA512Sum_Good(t *testing.T) {
data := []byte("hello")
expected := "9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043"
result := SHA512Sum(data)
assert.Equal(t, expected, result)
}