Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Sep 3, 2023
1 parent 7ac3f28 commit 6845ad1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion _examples/rsa_decrypt_oaep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ int main(int argc, char** argv) {
unsigned int dst_decrypt_len;
unsigned char* dst_decrypt;

// Determine the size of the output
if (crypsi_rsa_decrypt_oaep_sha256(rsa_private_key_char, message, strlen(message), &dst_decrypt, &dst_decrypt_len) != 0) {
printf("crypsi_rsa_decrypt_oaep_sha256 failed\n");
exit(1);
Expand Down
3 changes: 1 addition & 2 deletions _examples/rsa_digital_signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ int main(int argc, char** argv) {
unsigned int dst_signature_len;
unsigned char* dst_signature;

// Determine the size of the output
if (crypsi_rsa_sign_pss_sha256(rsa_private_key_char, message, strlen(message), &dst_signature, &dst_signature_len) != 0) {
printf("crypsi_rsa_sign_pss_sha256 failed\n");
exit(1);
}

printf("rsa signature result: %s\n", dst_signature);


free((void*) dst_signature);
free((void*) rsa_private_key_char);

return 0;
Expand Down
1 change: 0 additions & 1 deletion _examples/rsa_encrypt_oaep.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ int main(int argc, char** argv) {
unsigned int dst_encrypt_len;
unsigned char* dst_encrypt;

// Determine the size of the output
if (crypsi_rsa_encrypt_oaep_md5(rsa_public_key_char, message, strlen(message), &dst_encrypt, &dst_encrypt_len) != 0) {
printf("crypsi_rsa_encrypt_oaep_md5 failed\n");
exit(1);
Expand Down

0 comments on commit 6845ad1

Please sign in to comment.