Documentation ¶
Index ¶
- Constants
- type AlgoMode
- type Algorithm
- type Buffer
- func Compress(compressOption bool, raw Buffer) (Buffer, error)
- func Decode(encoding Encoding, raw Buffer) (Buffer, error)
- func Decompress(decompressOption bool, raw Buffer) (Buffer, error)
- func DecryptCTR(ciphertext Buffer, aesKey []byte) (Buffer, error)
- func DecryptChaCha20Poly1305(ciphertext Buffer, key []byte) (Buffer, error)
- func DecryptFamilyChaCha20(newCipherFunc func([]byte) (cipher.AEAD, error), nonceSize int, ...) (Buffer, error)
- func DecryptGCM(ciphertext Buffer, aesKey []byte) (Buffer, error)
- func DecryptRSA(ciphertext Buffer, priKey []byte) (Buffer, error)
- func DecryptXChaCha20Poly1305(ciphertext Buffer, key []byte) (Buffer, error)
- func Encode(encoding Encoding, raw Buffer) (Buffer, error)
- func EncryptCTR(plaintext Buffer, aesKey []byte) (Buffer, error)
- func EncryptChaCha20Poly1305(plaintext Buffer, key []byte) (Buffer, error)
- func EncryptFamilyChaCha20(newCipherFunc func([]byte) (cipher.AEAD, error), nonceSize int, ...) (Buffer, error)
- func EncryptGCM(plaintext Buffer, aesKey []byte) (Buffer, error)
- func EncryptRSA(plaintext Buffer, pubKey []byte) (Buffer, error)
- func EncryptXChaCha20Poly1305(plaintext Buffer, key []byte) (Buffer, error)
- type Encoding
Constants ¶
View Source
const ( // Default NoError gfcError = iota // Error PBDKF2 key and salt derivation ErrPBKDF2KeySalt // Error unmarshaling gfc symmetric key output ErrUnmarshalSymmAEAD // Error invalid keyfile length (32 bytes) ErrInvalidaes256BitKeyFileLen // Error CTR new cipher ErrNewCipherCTR // Error CTR in read loop ErrReadCTR // Error GCM new cipher ErrNewCipherGCM // Error GCM new GCM ErrNewGCM // Error GCM open ErrOpenGCM // Error RSA parse pubkey ErrParsePubRSA // Error RSA encrypt ErrEncryptRSA // Error RSA pase prikey ErrParsePriRSA // Error RSA decrypt ErrDecryptRSA // Error XChaCha20Poly1305 New cipher ErrNewCipherXChaCha20Poly1305 // Error XChaCha20Poly1305 Open ErrOpenXChaCha20Poly1305 )
View Source
const ( AlgoInvalid Algorithm = iota AlgoAES AlgoRSA AlgoXChaCha20 ModeInvalid AlgoMode = iota ModeAesGCM ModeAesCTR ModeRsaOEAP ModeXChaCha20Poly1305 ModeChaCha20Poly1305 EncodingNone Encoding = iota EncodingBase64 EncodingHex )
Avoid collisions by declaring them in 1 block
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
func DecryptChaCha20Poly1305 ¶
func DecryptFamilyChaCha20 ¶
func EncryptChaCha20Poly1305 ¶
func EncryptFamilyChaCha20 ¶
Click to show internal directories.
Click to hide internal directories.