Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64ToAlphabet ¶
Base64ToAlphabet convert base64 string to 256 bytes alphabet.
func NewMono256Maker ¶
func NewMono256Maker(b64alphabet string) (gcrypto.CipherRWCMaker, error)
func NewRandKeyBase64 ¶
func NewRandKeyBase64() string
NewRandKeyBase64 generates random key in base64 format.
Types ¶
type Mono256Cipher ¶
type Mono256Cipher struct {
// contains filtered or unexported fields
}
Mono256Cipher is monoalphabetic cipher codec
func NewMono256 ¶
func NewMono256(encAlphabet *alphabet) *Mono256Cipher
NewMono256 create new monoalphabetic cipher codec.
func (*Mono256Cipher) Decrypt ¶
func (cipher *Mono256Cipher) Decrypt(b []byte) error
Decrypt from ciphertext data to plaintext. It implements `EqLenCipher` interface.
func (*Mono256Cipher) Encrypt ¶
func (cipher *Mono256Cipher) Encrypt(b []byte) error
Encrypt plaintext data to ciphertext. It implements `EqLenCipher` interface.
type Mono256Maker ¶
type Mono256Maker struct {
// contains filtered or unexported fields
}
func (*Mono256Maker) Make ¶
func (m *Mono256Maker) Make(rwc io.ReadWriteCloser, genNonce bool, timeout *time.Duration, nonceCodec gcrypto.EqLenCipher) (gcrypto.CipherRWC, error)
func (*Mono256Maker) NonceSize ¶
func (m *Mono256Maker) NonceSize() int
Click to show internal directories.
Click to hide internal directories.