mirror of
https://github.com/sigcn/pg.git
synced 2025-10-24 10:43:06 +08:00
abstract symmetric encryption algorithm
This commit is contained in:
8
secure/symm_algo.go
Normal file
8
secure/symm_algo.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user