Documentation
¶
Index ¶
Constants ¶
View Source
const ( // memory and taking approximately 1s CPU time on a modern processor. StandardScryptN = 1 << 18 // StandardScryptP is the P parameter of Scrypt encryption algorithm, using 256MB // memory and taking approximately 1s CPU time on a modern processor. StandardScryptP = 1 )
Variables ¶
View Source
var ErrDecrypt = errors.New("could not decrypt key with given password")
Functions ¶
Types ¶
type CryptoJSON ¶
type CryptoJSON struct { Cipher string `json:"cipher"` CipherText string `json:"ciphertext"` CipherParams cipherparamsJSON `json:"cipherparams"` KDF string `json:"kdf"` KDFParams map[string]interface{} `json:"kdfparams"` MAC string `json:"mac"` }
func EncryptData ¶
func EncryptData(password, data []byte, scryptN, scryptP int) (*CryptoJSON, error)
type EncryptedKey ¶
type EncryptedKey struct { Address string `json:"address"` KeyType types.KeyType `json:"type"` Crypto *CryptoJSON `json:"crypto"` }
type KeccakState ¶
Click to show internal directories.
Click to hide internal directories.