Documentation ¶
Overview ¶
Package naclpipe provides io.Reader / io.Writer compatible crypto interface it is possible to create a transparent crypto interface on top of an io.Reader/io.Writer pattern.
Index ¶
Constants ¶
View Source
const ( SaltLength = 32 OldSaltLength = 16 // we use argon 2id by default DerivateScrypt = iota DerivateArgon2id )
INIT / INTERNAL
View Source
const Version string = "0.2.0"
Variables ¶
View Source
var ( // ErrUnsupported triggers for using an unsupported derivation function. ErrUnsupported = errors.New("unsupported option") // ErrUnsafe triggers for unsafe key derivation function. ErrUnsafe = errors.New("unsafe option") // ErrRead triggers on an error from the underlying io.Reader ErrRead = errors.New("read error") // ErrWrite triggers on an error from the underlying io.Writer ErrWrite = errors.New("write error") )
Functions ¶
func NewReader ¶
NewReader initialize an io.Reader using 'password' and the selected derivation function. Example:
cryptoReader, err := naclpipe.NewReader(os.Stdin, "mypassword", naclpipe.DerivateScrypt) if err != nil { return err }
Types ¶
type Argon2Params ¶ added in v0.2.0
Argon2Params describes the parameters used for calling the Argon2id key derivation function.
Click to show internal directories.
Click to hide internal directories.