Documentation ¶
Index ¶
- Constants
- Variables
- func ArgsDecryptIfKeyProvided(next router.ContextHandlerFunc, pos ...int) router.ContextHandlerFunc
- func Decrypt(key, value []byte) ([]byte, error)
- func DecryptArgs(key []byte, args [][]byte) ([][]byte, error)
- func DecryptBytesWith(key []byte) state.FromBytesTransformer
- func Encrypt(key []byte, value interface{}) ([]byte, error)
- func EncryptArgs(key []byte, args ...interface{}) ([][]byte, error)
- func EncryptBytesWith(key []byte) state.ToBytesTransformer
- func KeyFromTransient(c router.Context) ([]byte, error)
- func KeyPartsEncryptedWith(encryptKey []byte) state.KeyPartsTransformer
- func State(c router.Context, key []byte) (state.State, error)
- func StateWithTransientKey(c router.Context) (state.State, error)
- func TransientMapWithKey(key []byte) map[string][]byte
Constants ¶
View Source
const TransientMapKey = `ENCODE_KEY`
Variables ¶
View Source
var ( // ErrKeyNotDefinedInTransientMap occurs when key not defined in transient map ErrKeyNotDefinedInTransientMap = errors.New(`key not defined in transient map`) )
Functions ¶
func ArgsDecryptIfKeyProvided ¶
func ArgsDecryptIfKeyProvided(next router.ContextHandlerFunc, pos ...int) router.ContextHandlerFunc
func DecryptArgs ¶
DecryptArgs decrypt args
func DecryptBytesWith ¶
func DecryptBytesWith(key []byte) state.FromBytesTransformer
DecryptBytesWith decrypts by with key - used for decrypting data after reading from state
func EncryptArgs ¶
EncryptArgs encrypt args
func EncryptBytesWith ¶
func EncryptBytesWith(key []byte) state.ToBytesTransformer
EncryptBytesWith encrypts bytes with key - used for encrypting data for state
func KeyFromTransient ¶
KeyFromTransient gets key for encrypting/decrypting from transient map
func KeyPartsEncryptedWith ¶
func KeyPartsEncryptedWith(encryptKey []byte) state.KeyPartsTransformer
KeyPartsEncryptedWith encrypts key parts
func State ¶
State encrypting the data before putting to state and decrypting the data after getting from state
func StateWithTransientKey ¶
StateWithTransientKey creates encrypted state state with provided key for symmetric encryption/decryption
func TransientMapWithKey ¶
TransientMapWithKey creates transient map with encrypting/decrypting key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.