abstract symmetric encryption algorithm

This commit is contained in:
rkonfj
2024-03-10 14:37:33 +08:00
parent 3b40717cbf
commit f04f14d6d2
6 changed files with 45 additions and 34 deletions

8
secure/symm_algo.go Normal file
View File

@@ -0,0 +1,8 @@
package secure
type ProvideSecretKey func(pubKey string) ([]byte, error)
type SymmAlgo interface {
Encrypt(data []byte, pubKey string) ([]byte, error)
Decrypt(data []byte, pubKey string) ([]byte, error)
}