Encrypt TOTP secret before saving to database

This commit is contained in:
2024-10-31 16:24:32 +07:00
parent f705d9538f
commit 197383c414
21 changed files with 271 additions and 172 deletions

View File

@ -107,3 +107,8 @@ type Storage interface {
Delete(ctx context.Context, key string) error
ListObjects(ctx context.Context, prefix string) ([]string, error)
}
type Encryption interface {
Encrypt(enc string) (string, error)
Decrypt(dec string) (string, error)
}