added modified crypt tool
This commit is contained in:
parent
456ec10713
commit
a06b1eac47
|
@ -392,7 +392,7 @@ void ECIES_generate_key_pair(void) /* generate a public/private key pair */
|
||||||
//printf("Here is your new public/private key pair:\n");
|
//printf("Here is your new public/private key pair:\n");
|
||||||
bitstr_to_hex(buf, x);
|
bitstr_to_hex(buf, x);
|
||||||
//printf("Public key: %s:", bufptr);
|
//printf("Public key: %s:", bufptr);
|
||||||
FILE* f = fopen("pubx.key", "w");
|
FILE* f = fopen("files/pubx.key", "w");
|
||||||
if( f == NULL ){
|
if( f == NULL ){
|
||||||
printf("error opening pubx.key\n");
|
printf("error opening pubx.key\n");
|
||||||
while(1);
|
while(1);
|
||||||
|
@ -402,7 +402,7 @@ void ECIES_generate_key_pair(void) /* generate a public/private key pair */
|
||||||
|
|
||||||
bitstr_to_hex(buf, y);
|
bitstr_to_hex(buf, y);
|
||||||
//printf("%s\n", bufptr);
|
//printf("%s\n", bufptr);
|
||||||
f = fopen("puby.key", "w");
|
f = fopen("files/puby.key", "w");
|
||||||
if( f == NULL ){
|
if( f == NULL ){
|
||||||
printf("error opening puby.key\n");
|
printf("error opening puby.key\n");
|
||||||
while(1);
|
while(1);
|
||||||
|
@ -413,7 +413,7 @@ void ECIES_generate_key_pair(void) /* generate a public/private key pair */
|
||||||
|
|
||||||
bitstr_to_hex(buf, k);
|
bitstr_to_hex(buf, k);
|
||||||
//printf("Private key: %s\n", bufptr);
|
//printf("Private key: %s\n", bufptr);
|
||||||
f = fopen("priv.key", "w");
|
f = fopen("files/priv.key", "w");
|
||||||
if( f == NULL ){
|
if( f == NULL ){
|
||||||
printf("error opening priv.key\n");
|
printf("error opening priv.key\n");
|
||||||
while(1);
|
while(1);
|
||||||
|
|
Loading…
Reference in New Issue