Documentation ¶
Overview ¶
Package cipher provides an encryption and decryption interface.
It abstracts from the used cipher algorithm
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Password is the key one needs to derypt trice logs if enncrypted Password string // ShowKey, if set, allows to see the encryption passphrase ShowKey bool Key []byte )
local config values
Functions ¶
func Decrypt ¶ added in v0.24.1
Decrypt converts src into dst and returns count of converted bytes. Only multiple of 8 are convertable, so last 0-7 bytes are not convertable and c is a multiple of 8. The smaller byte slice limits the conversion.
func Decrypt8 ¶
Decrypt8 translates an Encrypt protected byte slice back in a slice of length 8.
Shorter slices are extented with 0 until length 8. Langer slices are truncated to length 8.
func Encrypt ¶ added in v0.24.1
Encrypt converts src into dst and returns count of converted bytes. Only multiple of 8 are convertable, so last 0-7 bytes are not convertable and c is a multiple of 8. The smaller byte slice limits the conversion.
Types ¶
This section is empty.