Documentation ¶
Index ¶
- func DecryptMessageWithPrivateKey(packet, nonce, privKey, senderPubKey []byte) (string, bool)
- func DecryptPassphraseWithPassword(encryptedPassphrase, iv, salt, tag []byte, password string) (string, error)
- func EncryptMessageWithPrivateKey(message string, privKey, recipientPubKey []byte) (packet []byte, nonce []byte)
- func EncryptPassphraseWithPassword(passphrase, password string) (result, tag, iv, salt []byte, err error)
- func GetAddressFromPublicKey(publicKey []byte) string
- func GetBigNumberStringFromBytes(data []byte) string
- func GetFirstEightBytesReversed(bytes []byte) []byte
- func GetPrivateKeyFromSecret(secret string) []byte
- func GetPublicKeyFromSecret(secret string) []byte
- func GetSHA256Hash(stringToHash string) [sha256.Size]byte
- func SignDataWithPrivateKey(data []byte, privKey []byte) []byte
- func SignMessageWithPrivateKey(message string, privKey []byte) []byte
- func VerifyDataWithPublicKey(data []byte, signature []byte, publicKey []byte) (bool, error)
- func VerifyMessageWithPublicKey(message string, signature []byte, publicKey []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptMessageWithPrivateKey ¶
DecryptMessageWithPrivateKey decrypts and verifies an encrypted message using the recipients private key
func DecryptPassphraseWithPassword ¶
func DecryptPassphraseWithPassword(encryptedPassphrase, iv, salt, tag []byte, password string) (string, error)
DecryptPassphraseWithPassword decrypts the given encrypted passphrase with the password using AES-256-CBC
func EncryptMessageWithPrivateKey ¶
func EncryptMessageWithPrivateKey(message string, privKey, recipientPubKey []byte) (packet []byte, nonce []byte)
EncryptMessageWithPrivateKey encrypts and authenticates a message for the given recipient's public key
func EncryptPassphraseWithPassword ¶
func EncryptPassphraseWithPassword(passphrase, password string) (result, tag, iv, salt []byte, err error)
EncryptPassphraseWithPassword encrypts the given passphrase with the password using AES-256-CBC
func GetAddressFromPublicKey ¶
GetAddressFromPublicKey takes a Lisk public key and returns the associated address
func GetBigNumberStringFromBytes ¶
GetBigNumberStringFromBytes returns the BigNumber representation of the bytes as string
func GetFirstEightBytesReversed ¶
GetFirstEightBytesReversed returns the first 8 bytes of a byte slice in reversed order.
func GetPrivateKeyFromSecret ¶
GetPrivateKeyFromSecret takes a Lisk secret and returns the associated private key
func GetPublicKeyFromSecret ¶
GetPublicKeyFromSecret takes a Lisk secret and returns the associated public key
func GetSHA256Hash ¶
GetSHA256Hash returns the SHA256 hash of a string as byte slice
func SignDataWithPrivateKey ¶
SignDataWithPrivateKey takes data and a privateKey and returns a signature
func SignMessageWithPrivateKey ¶
SignMessageWithPrivateKey takes a message and a privateKey and returns a signature as hex string
func VerifyDataWithPublicKey ¶
VerifyDataWithPublicKey takes data, a signature and a publicKey and verifies it
Types ¶
This section is empty.