Documentation ¶
Index ¶
- Variables
- func EqualHash(a, b Hash) bool
- func NewDecryptReadSeeker(key string, size int64, backingRs io.ReadSeeker) (io.ReadSeeker, error)
- func NewEncname() string
- type DecryptReadSeeker
- type Encryptor
- func (e *Encryptor) DecryptChunk(plainBytes, cipherBytes []byte) ([]byte, error)
- func (e *Encryptor) Encrypt(out io.Writer, in io.Reader, encrypt bool) (Hash, error)
- func (e *Encryptor) GetIv() string
- func (e *Encryptor) GetKey() string
- func (e *Encryptor) Init()
- func (e *Encryptor) SetIv(iv string)
- func (e *Encryptor) SetKey(key string)
- type Hash
Constants ¶
This section is empty.
Variables ¶
View Source
var ChunkSize = int64(1024 * 256) // 256KiB
Functions ¶
func NewDecryptReadSeeker ¶
func NewDecryptReadSeeker(key string, size int64, backingRs io.ReadSeeker) (io.ReadSeeker, error)
func NewEncname ¶
func NewEncname() string
NewEncname generates a random 200 bit number and returns the base32 string
Types ¶
type DecryptReadSeeker ¶
type DecryptReadSeeker struct {
// contains filtered or unexported fields
}
type Encryptor ¶
type Encryptor struct { ChunkIdx int64 // chuckCount used to derive nonce Overhead int64 // 16 // contains filtered or unexported fields }
func NewDecryptor ¶
func (*Encryptor) DecryptChunk ¶
func (*Encryptor) Encrypt ¶
Read plain/cipher text from in io.Reader and writes plain/cipher text to out io.Writer. If encrypt is true, then in is the plaintext.
Click to show internal directories.
Click to hide internal directories.