json

package
v0.0.0-...-015e77e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 3 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL