PRCYCoin  2.0.0.7rc1
P2P Digital Currency
bip38.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2018 The PIVX developers
2 // Copyright (c) 2018-2020 The DAPS Project developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_BIP38_H
7 #define BITCOIN_BIP38_H
8 
9 #include "pubkey.h"
10 #include "uint256.h"
11 
12 #include <string>
13 
14 
24 void DecryptAES(uint256 encryptedIn, uint256 decryptionKey, uint256& output);
25 
26 void ComputePreFactor(std::string strPassphrase, std::string strSalt, uint256& prefactor);
27 
28 void ComputePassfactor(std::string ownersalt, uint256 prefactor, uint256& passfactor);
29 
30 bool ComputePasspoint(uint256 passfactor, CPubKey& passpoint);
31 
32 void ComputeSeedBPass(CPubKey passpoint, std::string strAddressHash, std::string strOwnerSalt, uint512& seedBPass);
33 
34 void ComputeFactorB(uint256 seedB, uint256& factorB);
35 
36 std::string BIP38_Encrypt(std::string strAddress, std::string strPassphrase, uint256 privKey, bool fCompressed);
37 bool BIP38_Decrypt(std::string strPassphrase, std::string strEncryptedKey, uint256& privKey, bool& fCompressed);
38 
39 std::string AddressToBip38Hash(std::string address);
40 
41 #endif // BIP38_H
ComputeSeedBPass
void ComputeSeedBPass(CPubKey passpoint, std::string strAddressHash, std::string strOwnerSalt, uint512 &seedBPass)
Definition: bip38.cpp:57
uint256.h
ComputeFactorB
void ComputeFactorB(uint256 seedB, uint256 &factorB)
Definition: bip38.cpp:65
pubkey.h
BIP38_Decrypt
bool BIP38_Decrypt(std::string strPassphrase, std::string strEncryptedKey, uint256 &privKey, bool &fCompressed)
Definition: bip38.cpp:132
ComputePreFactor
void ComputePreFactor(std::string strPassphrase, std::string strSalt, uint256 &prefactor)
Definition: bip38.cpp:35
AddressToBip38Hash
std::string AddressToBip38Hash(std::string address)
Definition: bip38.cpp:72
BIP38_Encrypt
std::string BIP38_Encrypt(std::string strAddress, std::string strPassphrase, uint256 privKey, bool fCompressed)
Definition: bip38.cpp:81
uint256
256-bit unsigned big integer.
Definition: uint256.h:38
CPubKey
An encapsulated public key.
Definition: pubkey.h:37
ComputePassfactor
void ComputePassfactor(std::string ownersalt, uint256 prefactor, uint256 &passfactor)
Definition: bip38.cpp:42
uint512
512-bit unsigned big integer.
Definition: uint256.h:73
ComputePasspoint
bool ComputePasspoint(uint256 passfactor, CPubKey &passpoint)
Definition: bip38.cpp:50
DecryptAES
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:28