Documentation ¶
Overview ¶
Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1.
Index ¶
- func HashIdToHash(id byte) (h crypto.Hash, ok bool)
- func HashToHashId(h crypto.Hash) (id byte, ok bool)
- func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int)
- func Parse(r io.Reader) (f func(out, in []byte), err error)
- func Salted(out []byte, h hash.Hash, in []byte, salt []byte)
- func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte) error
- func Simple(out []byte, h hash.Hash, in []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashIdToHash ¶
HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP hash id.
func HashToHashId ¶
HashIdToHash returns an OpenPGP hash id which corresponds the given Hash.
func Iterated ¶
Iterated writes to out the result of computing the Iterated and Salted S2K function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase, salt and iteration count.
func Parse ¶
Parse reads a binary specification for a string-to-key transformation from r and returns a function which performs that transform.
func Salted ¶
Salted writes to out the result of computing the Salted S2K function (RFC 4880, section 3.7.1.2) using the given hash, input passphrase and salt.
Types ¶
This section is empty.