Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptValue ¶
func EncryptValue ¶
Types ¶
type AesCryptoStrategy ¶
type AesCryptoStrategy struct {
// contains filtered or unexported fields
}
func NewAesCryptoStrategy ¶
func NewAesCryptoStrategy(secretKey string) *AesCryptoStrategy
func (*AesCryptoStrategy) Name ¶
func (d *AesCryptoStrategy) Name() string
type CryptoStrategy ¶
type CryptoStrategy interface {
//
// Name
// @Description: CryptoType Name
// @return string crypto type name
//
Name() string
//
// Encrypt
// @Description: encrypt data
// @param src
// @param field
// @param db
// @return string encryption value
//
Encrypt(src string, field *schema.Field, db *gorm.DB) string
//
// Decrypt
// @Description: decrypt data
// @param src
// @param field
// @param db
// @return string decrypted value
//
Decrypt(src string, field *schema.Field, db *gorm.DB) string
}
Click to show internal directories.
Click to hide internal directories.