(t *testing.T)
| 243 | } |
| 244 | |
| 245 | func TestDecrypt_InvalidKey(t *testing.T) { |
| 246 | // First encrypt with a valid key |
| 247 | validKey := make([]byte, 32) |
| 248 | encrypted, err := Encrypt("test", validKey) |
| 249 | require.NoError(t, err) |
| 250 | |
| 251 | // Try to decrypt with an invalid key length |
| 252 | _, err = Decrypt(encrypted, []byte{1, 2, 3}) |
| 253 | assert.Error(t, err) |
| 254 | } |
| 255 | |
| 256 | func TestDeriveKey_Deterministic(t *testing.T) { |
| 257 | // Same input should produce same output |