Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecureMarshal ¶
func SecureMarshal(v interface{}, encryptFunc secure.EncryptionFunction, opt ...secure.Option) ([]byte, error)
SecureMarshal returns an encrypted JSON encoding of v. It adds support for sparse encryption and hashing via JSON struct tag options. If SecureMarshal is called at least one 'secure' option set on a struct field JSON tag, only those fields will be encrypted. The remaining encoded data stored as sparse plaintext. If no secure tag option is found, all the encoded data will be encrypted. For more detail, SEE: https://git.tcp.direct/kayos/chestnut-bitcask/blob/master/README.md
func SecureUnmarshal ¶
func SecureUnmarshal(data []byte, v interface{}, decryptFunc secure.DecryptionFunction, opt ...secure.Option) error
SecureUnmarshal decrypts & parses the JSON-encoded data returned by SecureUnmarshal and stores the result in the value pointed to by v. If v is nil or not a pointer, Unmarshal returns an error. SecureUnmarshal adds support for sparse decryption and via JSON struct tag options. If SecureMarshal is called at least one 'secure' option set on a struct field JSON tag, only those fields will be encrypted. The remaining encoded data stored as sparse plaintext. If SecureUnmarshal is called on a sparse encoding with the sparse option set, SecureUnmarshal will skip the decryption step and return only the plaintext decoding of v with encrypted fields replaced by empty values. For more detail, SEE: https://git.tcp.direct/kayos/chestnut-bitcask/blob/master/README.md
Types ¶
This section is empty.