(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestEncryptTOTPSecret_EmptyInput(t *testing.T) { |
| 95 | // An empty input is treated as "nothing to encrypt" — return empty |
| 96 | // without trying to seal a zero-length plaintext. This matters for |
| 97 | // upgrade paths where a half-initialised authenticator row exists. |
| 98 | out, err := EncryptTOTPSecret("", "k") |
| 99 | require.NoError(t, err) |
| 100 | assert.Equal(t, "", out) |
| 101 | } |
| 102 | |
| 103 | func TestIsEncryptedTOTPSecret(t *testing.T) { |
| 104 | assert.False(t, IsEncryptedTOTPSecret("")) |
nothing calls this directly
no test coverage detected