Documentation ¶
Index ¶
- func New(log logInterfaces.Logger, pepper string, ...) (res encryptionInterfaces.Encryption, err error)
- type Encryption
- func (c *Encryption) CreateMeta(provider encryptionInterfaces.EncProvider) encryptionInterfaces.Meta
- func (c *Encryption) CreateSqlMeta(provider encryptionInterfaces.EncProvider) encryptionInterfaces.SqlEncMeta
- func (c *Encryption) DefaultProvider() encryptionInterfaces.EncProvider
- func (c *Encryption) GetKeyId(keyId string) string
- func (c *Encryption) GetKeyVersion(keyId string) (version int)
- func (c *Encryption) Hash(data []byte) []byte
- func (c *Encryption) MongoDecrypt(data interface{}, dest interface{}) (err error)
- func (c *Encryption) MongoEncrypt(data interface{}) (res interface{}, err error)
- func (c *Encryption) Provider(providerId, keyId string) encryptionInterfaces.EncProvider
- func (c *Encryption) SqlDecrypt(src, dst interface{}) (err error)
- func (c *Encryption) SqlEncrypt(data interface{}) (res interface{}, err error)
- func (c *Encryption) SqlScheme(data interface{}) (val interface{}, name string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(log logInterfaces.Logger, pepper string, configs ...encryptionInterfaces.KeyProviderConfig) (res encryptionInterfaces.Encryption, err error)
Types ¶
type Encryption ¶
func (*Encryption) CreateMeta ¶
func (c *Encryption) CreateMeta(provider encryptionInterfaces.EncProvider) encryptionInterfaces.Meta
func (*Encryption) CreateSqlMeta ¶
func (c *Encryption) CreateSqlMeta(provider encryptionInterfaces.EncProvider) encryptionInterfaces.SqlEncMeta
func (*Encryption) DefaultProvider ¶
func (c *Encryption) DefaultProvider() encryptionInterfaces.EncProvider
func (*Encryption) GetKeyId ¶
func (c *Encryption) GetKeyId(keyId string) string
func (*Encryption) GetKeyVersion ¶
func (c *Encryption) GetKeyVersion(keyId string) (version int)
func (*Encryption) Hash ¶
func (c *Encryption) Hash(data []byte) []byte
func (*Encryption) MongoDecrypt ¶
func (c *Encryption) MongoDecrypt(data interface{}, dest interface{}) (err error)
MongoDecrypt - transform mongodb encryption model to golang struct
func (*Encryption) MongoEncrypt ¶
func (c *Encryption) MongoEncrypt(data interface{}) (res interface{}, err error)
MongoEncrypt - transform golang struct to mongodb encryption model always use default provider
func (*Encryption) Provider ¶
func (c *Encryption) Provider(providerId, keyId string) encryptionInterfaces.EncProvider
func (*Encryption) SqlDecrypt ¶
func (c *Encryption) SqlDecrypt(src, dst interface{}) (err error)
SqlDecrypt - transform sql encryption model to golang struct
func (*Encryption) SqlEncrypt ¶
func (c *Encryption) SqlEncrypt(data interface{}) (res interface{}, err error)
SqlEncrypt - encrypted data and transform golang struct to sql encryption model always use default provider
func (*Encryption) SqlScheme ¶
func (c *Encryption) SqlScheme(data interface{}) (val interface{}, name string, err error)
SqlScheme - transform golang struct to sql encryption model
Click to show internal directories.
Click to hide internal directories.