Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AesCipher ¶
type AesCipher struct {
// contains filtered or unexported fields
}
AesCipher aes加密解密
func (*AesCipher) DecryptBase64 ¶
DecryptBase64 解密
type AesInterface ¶
type AesInterface interface { EncryptBase64(in []byte) (string, error) DecryptBase64(b string) ([]byte, error) }
AesInterface aes加密解密接口
type AsymmetricEncryptionConfig ¶ added in v1.2.0
type AsymmetricEncryptionConfig struct { // 公钥 PublicKey string `json:"public_key"` // 私钥 PrivateKey string `json:"private_key"` }
AsymmetricEncryptionConfig 非对称加密配置
func NewAsymmetricEncryptionConfig ¶ added in v1.2.0
func NewAsymmetricEncryptionConfig(publicKey, privateKey string) *AsymmetricEncryptionConfig
NewAsymmetricEncryptionConfig 创建非对称加密配置
func (*AsymmetricEncryptionConfig) Scan ¶ added in v1.2.0
func (c *AsymmetricEncryptionConfig) Scan(value interface{}) error
Scan 实现gorm的Scan方法
func (*AsymmetricEncryptionConfig) ToConf ¶ added in v1.2.0
func (c *AsymmetricEncryptionConfig) ToConf() *conf.AsymmetricEncryptionConfig
ToConf 转换为conf.AsymmetricEncryptionConfig
type SymmetricEncryptionConfig ¶ added in v1.2.0
type SymmetricEncryptionConfig struct { // 密钥 Key string `json:"key"` // 初始化向量 Iv string `json:"iv"` }
SymmetricEncryptionConfig 对称加密配置
func NewSymmetricEncryptionConfig ¶ added in v1.2.0
func NewSymmetricEncryptionConfig(key, iv string) *SymmetricEncryptionConfig
NewSymmetricEncryptionConfig 创建对称加密配置
func (*SymmetricEncryptionConfig) Scan ¶ added in v1.2.0
func (c *SymmetricEncryptionConfig) Scan(value interface{}) error
Scan 实现gorm的Scan方法
func (*SymmetricEncryptionConfig) ToConf ¶ added in v1.2.0
func (c *SymmetricEncryptionConfig) ToConf() *conf.SymmetricEncryptionConfig
ToConf 转换为conf.SymmetricEncryptionConfig
Click to show internal directories.
Click to hide internal directories.