Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSaltLen = errors.New("invalid salt length") ErrUninitialisedSalt = errors.New("uninitialised salt") ErrUninitialisedMethod = errors.New("cipher method type uninitialised") //ErrCannotReadMagicBytes = errors.New("cannot read magic bytes") //no usage for now ErrInvalidReadFlow = errors.New("func ReadMagic should be called before calling Read") ErrInvalidKeyState = errors.New("func GenerateKey should be called first") ErrInvalidSegmentLength = errors.New("segment length is too long") )
View Source
var ErrInvalidParameter = errors.New("invalid parameter")
Functions ¶
This section is empty.
Types ¶
type CipherMethodType ¶
type CipherMethodType byte
const ( Uninitialised CipherMethodType = 0x00 XChaCha20Simple CipherMethodType = 0x01 AES256GCMSimple CipherMethodType = 0x02 DefaultCipherMethod = XChaCha20Simple )
type InvalidCipherMethod ¶
type InvalidCipherMethod []byte
func (InvalidCipherMethod) Error ¶
func (i InvalidCipherMethod) Error() string
type Privacy ¶
type Privacy struct {
// contains filtered or unexported fields
}
func (*Privacy) GenerateKey ¶
func (*Privacy) GetSegmentSize ¶
func (*Privacy) SetSegmentSize ¶
type Reader ¶
type Reader struct { *Privacy // contains filtered or unexported fields }
func NewPrivacyReader ¶
type WriteCloser ¶
type WriteCloser struct { *Privacy // contains filtered or unexported fields }
func NewPrivacyWriteCloser ¶
func NewPrivacyWriteCloser(wc io.WriteCloser, cmType CipherMethodType) *WriteCloser
func NewPrivacyWriteCloserWithKeyGen ¶
func NewPrivacyWriteCloserWithKeyGen(wc io.WriteCloser, cmType CipherMethodType, keygen KeyGen) *WriteCloser
func NewPrivacyWriterCloserDefault ¶
func NewPrivacyWriterCloserDefault(wc io.WriteCloser) *WriteCloser
func (*WriteCloser) Close ¶
func (wc *WriteCloser) Close() (err error)
Click to show internal directories.
Click to hide internal directories.