#include <stdio.h>
#include <string.h>

#include "passwd.h"
#include "debug.h"

char pwd_signkey[PWD_SIGNKEY_LEN];

void storeKeyPasswd(char *pwd) {
    DEBUGP("setting sign key passwd to: %s\n", pwd);
    strncpy(pwd_signkey, pwd, PWD_SIGNKEY_LEN); 
}


void askPasswd() {
    printf("please enter passwd: ");
    scanf("%s", pwd_signkey);
}


const char *pwdCallBack(void *HOOK, const char *DESC, void **R_HD) {
    DEBUGP("passphrase callback: DESC=%s\n", DESC);
    
//    return pwd_signkey;
    return "a";
}
