bitcoin_crypter/
masterkey.rs

1crate::ix!();
2
3/**
4  | Master key for wallet encryption
5  |
6  */
7pub struct MasterKey {
8
9    vch_crypted_key:                 Vec<u8>,
10    vch_salt:                        Vec<u8>,
11
12    /**
13      | 0 = EVP_sha512() 
14      | 1 = scrypt()
15      |
16      */
17    n_derivation_method:             u32,
18
19    n_derive_iterations:             u32,
20
21    /**
22      | Use this for more parameters to key derivation,
23      | such as the various parameters to scrypt
24      |
25      */
26    vch_other_derivation_parameters: Vec<u8>,
27}
28
29lazy_static!{
30    /*
31    SERIALIZE_METHODS(CMasterKey, obj)
32        {
33            READWRITE(obj.vchCryptedKey, obj.vchSalt, obj.nDerivationMethod, obj.nDeriveIterations, obj.vchOtherDerivationParameters);
34        }
35    */
36}
37
38impl Default for MasterKey {
39    
40    fn default() -> Self {
41        todo!();
42        /*
43
44            // 25000 rounds is just under 0.1 seconds on a 1.86 GHz Pentium M
45            // ie slightly lower than the lowest hardware we need bother supporting
46            nDeriveIterations = 25000;
47            nDerivationMethod = 0;
48            vchOtherDerivationParameters = std::vector<unsigned char>(0);
49        */
50    }
51}