PIVX Core  5.6.99
P2P Digital Currency
bip38.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2021 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_BIP38_H
6 #define PIVX_BIP38_H
7 
8 #include "pubkey.h"
9 #include "uint256.h"
10 
11 #include <string>
12 
13 
23 void DecryptAES(uint256 encryptedIn, uint256 decryptionKey, uint256& output);
24 
25 void ComputePreFactor(std::string strPassphrase, std::string strSalt, uint256& prefactor);
26 
27 void ComputePassfactor(std::string ownersalt, uint256 prefactor, uint256& passfactor);
28 
29 bool ComputePasspoint(uint256 passfactor, CPubKey& passpoint);
30 
31 void ComputeSeedBPass(CPubKey passpoint, std::string strAddressHash, std::string strOwnerSalt, uint512& seedBPass);
32 
33 void ComputeFactorB(uint256 seedB, uint256& factorB);
34 
35 std::string BIP38_Encrypt(std::string strAddress, std::string strPassphrase, uint256 privKey, bool fCompressed);
36 bool BIP38_Decrypt(std::string strPassphrase, std::string strEncryptedKey, uint256& privKey, bool& fCompressed);
37 
38 std::string AddressToBip38Hash(const std::string& address);
39 
40 #endif // PIVX_BIP38_H
void ComputePreFactor(std::string strPassphrase, std::string strSalt, uint256 &prefactor)
Definition: bip38.cpp:52
void ComputeSeedBPass(CPubKey passpoint, std::string strAddressHash, std::string strOwnerSalt, uint512 &seedBPass)
Definition: bip38.cpp:98
std::string AddressToBip38Hash(const std::string &address)
Definition: bip38.cpp:112
bool BIP38_Decrypt(std::string strPassphrase, std::string strEncryptedKey, uint256 &privKey, bool &fCompressed)
Definition: bip38.cpp:169
std::string BIP38_Encrypt(std::string strAddress, std::string strPassphrase, uint256 privKey, bool fCompressed)
Definition: bip38.cpp:119
void ComputeFactorB(uint256 seedB, uint256 &factorB)
Definition: bip38.cpp:106
bool ComputePasspoint(uint256 passfactor, CPubKey &passpoint)
Definition: bip38.cpp:66
void ComputePassfactor(std::string ownersalt, uint256 prefactor, uint256 &passfactor)
Definition: bip38.cpp:59
void DecryptAES(uint256 encryptedIn, uint256 decryptionKey, uint256 &output)
39 bytes - 78 characters 1) Prefix - 2 bytes - 4 chars - strKey[0..3] 2) Flagbyte - 1 byte - 2 chars ...
Definition: bip38.cpp:47
An encapsulated public key.
Definition: pubkey.h:44
256-bit opaque blob.
Definition: uint256.h:138
512-bit opaque blob.
Definition: uint256.h:184