| 730 | static struct { uchar *salt, *priv; uint pwdcfg; } passdargs; |
| 731 | |
| 732 | static int passdeferred(void *pass) // decrypt the private key in the background |
| 733 | { |
| 734 | uchar keyhash[32]; |
| 735 | int iterations = passdargs.pwdcfg >> 10; |
| 736 | passphrase2key((char*)pass, passdargs.salt, 16, keyhash, 32, &iterations, 0, passdargs.pwdcfg & 0x3ff); |
| 737 | xor_block(passdargs.priv, keyhash, 32); |
| 738 | delstring((char *)pass); |
| 739 | extern void authsetup(char **args, int numargs); |
| 740 | authsetup(NULL, -1); // tell authsetup, that the passwd is done |
| 741 | return 0; |
| 742 | } |
| 743 | |
| 744 | void savepreprivkey(const char *filename, uchar *preprivkey, uchar preprivlen, uchar *psalt, uint preprivpwdcfg) { |
| 745 | char hextemp[128 * 2 + 1]; |
nothing calls this directly
no test coverage detected