1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-17 16:12:42 +08:00
Files
go-mixed/crypto/crypto.go
2022-04-20 11:34:03 +08:00

19 lines
367 B
Go

package crypto
// 对称加密
type ISymmetric interface {
Encrypt(msg []byte) ([]byte, error)
Decrypt(cipherText []byte) ([]byte, error)
}
// 非对称加密
type IAsymmetric interface {
Encrypt(msg []byte) ([]byte, error)
Decrypt(ciphertext []byte) ([]byte, error)
}
type Signer interface {
Sign(msg []byte) ([]byte, error)
Verify(msg, sign []byte) bool
}