Codebase list libcryptx-perl / a3655dc
optimized ecc_encrypt_key Karel Miko 10 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
8383 }
8484
8585 pubkeysize = ECC_BUF_SIZE;
86 if ((err = ecc_export_raw(pub_expt, &pubkeysize, PK_PUBLIC, &pubkey)) != CRYPT_OK) {
86 if ((err = ecc_export_raw(pub_expt, &pubkeysize, PK_PUBLIC_COMPRESSED, &pubkey)) != CRYPT_OK) {
8787 ecc_free(&pubkey);
8888 goto LBL_ERR;
8989 }
6464
6565 my $ct = $pu1->encrypt("secret message");
6666 my $pt = $pr1->decrypt($ct);
67 ok(length $ct > 80, 'encrypt ' . length($ct));
67 ok(length $ct > 30, 'encrypt ' . length($ct));
6868 is($pt, "secret message", 'decrypt');
6969
7070 my $sig = $pr1->sign_message("message");