Documentation
¶
Index ¶
Constants ¶
View Source
const (
// PublicKeyField is the field name of the public key in the ejson
PublicKeyField = "_public_key"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EjsonDecryptor ¶
type EjsonDecryptor struct {
// Interface decryptor config
Config decryptors.DecryptorConfig
// contains filtered or unexported fields
}
func NewEJSONDecryptor ¶
func NewEJSONDecryptor(config decryptors.DecryptorConfig, keyDirectory string, keys ...string) (*EjsonDecryptor, error)
Initialize a new EJSON Decryptor
func (*EjsonDecryptor) AddKey ¶
func (d *EjsonDecryptor) AddKey(key string) error
func (*EjsonDecryptor) Decrypt ¶
func (d *EjsonDecryptor) Decrypt(data []byte) (content map[string]interface{}, err error)
Read an ejson file Skip decryption still removes the publicKeyField
func (*EjsonDecryptor) IsEncrypted ¶
func (d *EjsonDecryptor) IsEncrypted(data []byte) (bool, error)
Click to show internal directories.
Click to hide internal directories.