Documentation ¶
Index ¶
- func DecryptDataWithAES256(secretKey []byte, additional []byte, ciphertext []byte) ([]byte, error)
- func EncryptDataWithAES256(secretKey, additional, data []byte) ([]byte, error)
- func EncryptDataWithSecp256k1(pubKeyByte []byte, data []byte) ([]byte, error)
- func GenerateMnemonic() (string, error)
- func GeneratePrivateKeyFromMnemonic(mnemonic string, coinType uint32) (secp256k1.PrivKey, error)
- func GenerateRandomKey(size int) ([]byte, error)
- func Hash(data []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptDataWithAES256 ¶
DecryptDataWithAES256 combines secretKey and secondKey to decrypt AES256-GCM.
func EncryptDataWithAES256 ¶
EncryptDataWithAES256 combines secretKey and secondKey to encrypt with AES256-GCM method.
func EncryptDataWithSecp256k1 ¶
EncryptDataWithSecp256k1 encrypts data using recipient public key (ECIES) Secp256k1 is the only supported elliptic curve for encryption.
func GenerateMnemonic ¶
GenerateMnemonic create a new mnemonic
func GeneratePrivateKeyFromMnemonic ¶
GeneratePrivateKeyFromMnemonic when a valid mnemonic is inputted, it returns a PrivKey and error is nil. If the mnemonic is not valid, an error is not nil.
func GenerateRandomKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.