MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestDeriveKey_Deterministic

Function TestDeriveKey_Deterministic

pkg/utils/crypto_test.go:256–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

254}
255
256func TestDeriveKey_Deterministic(t *testing.T) {
257 // Same input should produce same output
258 key1, err := deriveKey([]byte("samepassword"))
259 require.NoError(t, err)
260
261 key2, err := deriveKey([]byte("samepassword"))
262 require.NoError(t, err)
263
264 assert.Equal(t, key1, key2)
265}
266
267func TestDeriveKey_DifferentPasswords(t *testing.T) {
268 key1, err := deriveKey([]byte("password1"))

Callers

nothing calls this directly

Calls 1

deriveKeyFunction · 0.85

Tested by

no test coverage detected