Documentation
¶
Overview ¶
Package bip38 provides private key encryption and decryption using scrypt and AES.
Index ¶
- Variables
- func Decrypt(encryptedKeyString string, password string) (privateKey []byte, compressed bool, err error)
- func Encrypt(privateKey []byte, password string, compressed bool) (string, error)
- func EncryptIntermediateCode(random io.Reader, intermediateCodeStr string, compressed bool) (string, error)
- func GenerateIntermediateCode(random io.Reader, password string) (string, error)
- func GenerateIntermediateCodeWithLotSequence(random io.Reader, password string, lot, sequence uint32) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidPrivateKey is returned if attempting to encrypt a private key which // is either nil, or of the wrong length. ErrInvalidPrivateKey = errors.New("invalid private key to encrypt") // ErrInvalidEncryptedKey is returned when decoding a BIP38 key fails. ErrInvalidEncryptedKey = errors.New("key is not in bip38 encrypted format") // ErrDecryptionFailed is returned when decrypting a BIP38 key, either when the key is not // encrypted properly, or if the password is incorrect. ErrDecryptionFailed = errors.New("failed to decrypt bip38 key") )
Functions ¶
func EncryptIntermediateCode ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.