Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Sep 3, 2023
1 parent 09284a0 commit fbdd24d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 140 deletions.
26 changes: 0 additions & 26 deletions Main.cpp

This file was deleted.

60 changes: 59 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,62 @@ todo
- Generate Hash with Common DIGEST Algorithm ✔️
#### Example
todo
C
```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "crypsi.h"
int main(int argc, char** argv) {
printf("hello\n");
char* message = "wuriyanto";
unsigned char* dst_digest;
int dst_digets_len;
if(crypsi_sha512(message, strlen(message), &dst_digest, &dst_digets_len) != 0) {
printf("digest error\n");
return -1;
}
printf("message len: %d\n", dst_digets_len);
printf("digest result: %s\n", dst_digest);
free((void*) dst_digest);
return 0;
}
```

C++
```CPP
#include <iostream>
#include "crypsi.h"

int main(int argc, char** argv)
{

const char* message = "wuriyanto";

unsigned char* dst_digest;
unsigned int dst_digets_len;

if(crypsi_sha512((const unsigned char*) message, strlen(message), &dst_digest, &dst_digets_len) != 0) {
printf("digest error\n");
return -1;
}

printf("message len: %d\n", dst_digets_len);

printf("digest result: %s\n", dst_digest);

printf("__cplusplus: %ld\n", __cplusplus);

delete dst_digest;

return 0;
}
```
113 changes: 0 additions & 113 deletions main.c

This file was deleted.

0 comments on commit fbdd24d

Please sign in to comment.