Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/telkomdev/c-crypsi
Custom crypto utility for C/C++ based on Openssl Crypto Library to make life easier
https://github.com/telkomdev/c-crypsi
aes c cryptography digest openssl
Last synced: about 5 hours ago
JSON representation
Custom crypto utility for C/C++ based on Openssl Crypto Library to make life easier
- Host: GitHub
- URL: https://github.com/telkomdev/c-crypsi
- Owner: telkomdev
- License: mit
- Created: 2023-08-28T13:31:42.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-05T16:19:26.000Z (about 1 year ago)
- Last Synced: 2023-09-05T17:27:49.380Z (about 1 year ago)
- Topics: aes, c, cryptography, digest, openssl
- Language: C
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## c-crypsi (Crypto Utility for C and C++)
Custom crypto utility for C/C++ based on `openssl` crypto library to make life easier
[![c-crypsi CI](https://github.com/telkomdev/c-crypsi/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/telkomdev/c-crypsi/actions/workflows/ci.yml)
### Install
Its `header only`, just import to your project
```c
#include "crypsi.h"int main(int argc, char** argv) {
}
```### c-crypsi is compatible with each other with the following libraries
- NodeJs https://github.com/telkomdev/crypsi
- Golang https://github.com/telkomdev/go-crypsi
- Python https://github.com/telkomdev/pycrypsi
- C# (.NET) https://github.com/telkomdev/NetCrypsi
- Java/JVM https://github.com/telkomdev/jcrypsi
- Javascript (React and Browser) https://github.com/telkomdev/crypsi.js
- PostgreSQL https://github.com/telkomdev/pgcrypsi
- MySQL https://github.com/telkomdev/crypsi-mysql-udf### Features
- Asymmetric encryption with RSA ✔️
- Generate RSA private and public key ✔️
- Digital Signature with RSA private and public key using PSS ✔️
- Symmetric encryption with AES (GCM, CBC) ✔️
- Message authentication code with HMAC ✔️
- Generate Hash with Common DIGEST Algorithm ✔️#### Usage
C
```c
#include
#include
#include
#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
#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);
delete dst_digest;return 0;
}
```