pgp_s2k

package
v1.0.5001 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(h func() hash.Hash, password, salt []byte, iterations, keylen int) []byte

* * OpenPGP's S2K * * See RFC 4880 sections 3.7.1.1, 3.7.1.2, and 3.7.1.3 * If the salt is empty and iterations == 1, "simple" S2K is used * If the salt is non-empty and iterations == 1, "salted" S2K is used * If the salt is non-empty and iterations > 1, "iterated" S2K is used * * Due to complexities of the PGP S2K algorithm, time-based derivation * is not supported. So if iterations == 0 and msec.count() > 0, an * exception is thrown. In the future this may be supported, in which * case "iterated" S2K will be used and the number of iterations * performed is returned.

func KeyWithTune

func KeyWithTune(h func() hash.Hash, password, salt []byte, iterations, keylen int, msec time.Duration) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL