This commit restructures the `crypt` service to be more modular and decoupled from storage concerns. - The standard cryptographic implementations (`lthn`, `chachapoly`, `rsa`) have been moved to the `pkg/crypt/std` directory. - The `rootfs` components have been removed to decouple the library from storage. - Import paths have been updated to reflect the new structure.
18 lines
294 B
Go
18 lines
294 B
Go
package lthn
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestHash(t *testing.T) {
|
|
hash := Hash("hello")
|
|
assert.NotEmpty(t, hash)
|
|
}
|
|
|
|
func TestVerify(t *testing.T) {
|
|
hash := Hash("hello")
|
|
assert.True(t, Verify("hello", hash))
|
|
assert.False(t, Verify("world", hash))
|
|
}
|