Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶ added in v0.2.0
func Encrypt(key string, cryptoParams CryptoParams, data EncryptTransformer) (any, error)
Types ¶
type CryptoParams ¶
type CryptoParams struct { CipherSuite string `json:"cipherSuite" yaml:"cipherSuite" mapstructure:"cipherSuite"` Nonce string `json:"nonce" yaml:"nonce" mapstructure:"nonce"` }
func NewCryptoParams ¶
func NewCryptoParams(cipherSuite string) (CryptoParams, error)
func (CryptoParams) GetCryptoConfig ¶
func (p CryptoParams) GetCryptoConfig(masterKeyHex string) (sio.Config, error)
type DecryptTransformer ¶
type DecryptTransformer interface { EncryptTransformer GetCryptoParams() CryptoParams }
type Decrypter ¶
type Decrypter struct {
// contains filtered or unexported fields
}
func NewDecrypter ¶
func NewDecrypter(masterKeyHex string, c TransformConfig) Decrypter
type EncryptTransformer ¶
type EncryptTransformer interface {
GetTransformConfig() TransformConfig
}
type Encrypter ¶
type Encrypter struct {
// contains filtered or unexported fields
}
func NewEncrypter ¶
func NewEncrypter(masterKeyHex string, p CryptoParams, c TransformConfig) Encrypter
type TransformConfig ¶
Click to show internal directories.
Click to hide internal directories.