Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
Cipher defines resenje.org/cipher.StringCipher interface.
func (Cipher) Decrypt ¶ added in v0.1.5
Decrypt decrypts input data produced by Encrypt. It performs a basic XOR encryption and validates Adler32 checksum.
func (Cipher) DecryptString ¶
DecryptString decrypts input string produced by EncryptString. It performs a basic XOR encryption and validates Adler32 checksum.
type Option ¶ added in v0.1.2
type Option func(*Cipher)
Option is used to specify optional parameters to the New constructor.
func WithInputEncoder ¶ added in v0.1.2
func WithInputEncoder(e cipher.StringEncoder) Option
WithInputEncoder sets the EncryptString input data encoding. By default, no input data decoding of input data is performed. If the input data is always with the same encoding, encrypted strings can be reduced in size, buy specifying this option.
func WithOutputEncoder ¶ added in v0.1.2
func WithOutputEncoder(e cipher.StringEncoder) Option
WithOutputEncoder sets the EncryptString returned data encoding. By default, resenje.org/cipher.DefaultEncoder is used.