Documentation ¶
Index ¶
Constants ¶
View Source
const PreferedVersion = V1
PreferedVersion is the preferred version of encryption.
Variables ¶
View Source
var MaxHeaderSize = v1.HeaderSize + 4
MaxHeaderSize is the maximum header size of all versions. This many bytes at the beginning of a file should be enough to compute a hash of a local file.
View Source
var Overhead = v1.Overhead + 4
Overhead is the overhead added by the preferred encryption library plus the version.
Functions ¶
func Hash ¶
func Hash(r io.Reader, header io.Reader, password []byte, hashFunc func() hash.Hash) ([]byte, error)
Hash will hash of plaintext based on the header of the encrypted file and returns the hash Sum.
func NewDecrypter ¶
NewDecrypter returns a decrypting reader based on the version used to encrypt.
Types ¶
Click to show internal directories.
Click to hide internal directories.