Documentation
¶
Overview ¶
Package gormcrypto is another library for encrypting/signing data with GORM
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config provides the global configuration data for gormcrypto. At the moment, that's just a list of different Setups your application supports. We support multiple Setups because application requirements change over time, and you'll want to be able to use values encrypted/signed by older keys/algorithms. The Time value used in the map indicates when the Setup was - or should be - made active in your code.
func ConfigFromBytes ¶
ConfigFromBytes converts a YAML document into a valid Config object
func GlobalConfig ¶
func GlobalConfig() Config
GlobalConfig gets the global config value. NOTE: This function will be deprecated at some point if I can work out how to properly make gormcrypto into a GORM plugin.
func (Config) ConfigToBytes ¶
ConfigToBytes converts a Config value into a YAML-encoded byte slice for export to a file or other storage
func (Config) CurrentSetup ¶
CurrentSetup returns the most recent Setup value based on the Time it was set up under
type Setup ¶
type Setup struct { Encoder encoding.Algorithm Serializer serializing.Algorithm Encrypter encryption.Algorithm Signer signing.Algorithm }
Setup describes the way your data should be handled by gormcrypto. That includes the encryption algorithm/keys, the signing algorithm/keys, the mechanism for serializing values, and the encoding to use to coerce binary data into values that can safely be serialized/stored.
Directories
¶
Path | Synopsis |
---|---|
Package cryptypes provides the supported cryptographic types supperted by gormcrypto out of the box
|
Package cryptypes provides the supported cryptographic types supperted by gormcrypto out of the box |
Package encoding defines the various encoding Algorithms supported by the gormcrypto package
|
Package encoding defines the various encoding Algorithms supported by the gormcrypto package |
Package encryption defines the various encryption Algorithms supported by the gormcrypto package
|
Package encryption defines the various encryption Algorithms supported by the gormcrypto package |
Package serializing defines the various serializing Algorithms supported by the gormcrypto package
|
Package serializing defines the various serializing Algorithms supported by the gormcrypto package |
Package signing defines the various signing Algorithms supported by the gormcrypto package
|
Package signing defines the various signing Algorithms supported by the gormcrypto package |