Documentation ¶
Index ¶
Constants ¶
View Source
const ( // argon up to date parameters ArgonCostTime = 2 ArgonCostMemory = 256 * 1024 ArgonCostThreads = 8 // more up to date parameters ScryptCostParam = 65536 ScryptCostN = 16 ScryptCostP = 4 // insecure by now.. Pbkdf2Iteration = 16384 // ou key length KeyLength = 32 SaltLength = 32 AEADPemFileHeader = "PEMAEAD FILE" AEADFormat = "AEAD,%02d%02d,%x,%x" DerivatePbkdf2 = 0x00 DerivateScrypt = 0x01 DerivateArgon2 = 0x02 // Argon2id by default CipherAESGCM = 0x00 Version = "0.1.0" )
Variables ¶
View Source
var ( ErrUnsafe = errors.New("unsafe option") ErrInvalid = errors.New("invalid data") )
Functions ¶
func NewWriter ¶
func NewWriter(w io.WriteCloser, password []byte, c, d uint8) (io.WriteCloser, error)
func NewWriter(w io.Writer, password []byte, cipher, derivation uint8) (*AEADPemFile, error) {
Types ¶
Click to show internal directories.
Click to hide internal directories.