encryptNoEc static method
String
encryptNoEc(
- List<
int> privKey, - String passphrase, {
- PubKeyModes pubKeyMode = PubKeyModes.compressed,
Encrypt a Bitcoin private key without using ECDSA.
This method encrypts a Bitcoin private key using BIP38 encryption without relying on the Elliptic Curve Digital Signature Algorithm (ECDSA). It takes the private key, passphrase, and an optional public key mode as inputs and returns the BIP38-encrypted private key as a string.
privKey
: The Bitcoin private key to be encrypted.passphrase
: The passphrase for encryption.pubKeyMode
: The selected public key mode (compressed or uncompressed). Defaults to PubKeyModes.compressed.- Returns: The BIP38-encrypted private key as a string.
Implementation
static String encryptNoEc(List<int> privKey, String passphrase,
{PubKeyModes pubKeyMode = PubKeyModes.compressed}) {
return Bip38NoEcEncrypter.encrypt(privKey, passphrase, pubKeyMode);
}