OpenSSL
// enc_rsa.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of […]
Continue reading about OpenlSSL – RSA 패키지를 이용한 공개키 & 개인키 만들기
// dec_evp.c// // Copyright 2009 Kim Sung-tae <pchero21@gmail.com>// // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of […]
libssl-dev 우분투/데비안 의 경우… # sudo apt-get install libssl-dev
#include <stdio.h>#include <string.h>#include <openssl/bio.h>#include <openssl/err.h>#include <openssl/bn.h>#include <openssl/dh.h>#include <openssl/rand.h>#include <openssl/pem.h> #define IN_FILE “./plain.txt” // plain file#define OUT_FILE “./encrypt.txt” // cipher file unsigned char* readFile(char *file, int *readLen);unsigned char *readFileBio(BIO *fileBIO, int *readLen);unsigned char *addString(unsigned char *destString, int destLen, const unsigned char *addString, int addLen); int main(int argc, char* argv[]){ […]
#include <stdio.h> #include <stdio.h>#include <string.h>#include <openssl/evp.h>#include <openssl/objects.h>#include <openssl/rand.h> int main(int argc, char* argv[]){ int i; // salt bufer length = 8 unsigned char salt[8]; // EVP_CIPHER = Cipher structure const EVP_CIPHER *cipher = NULL; […]
Recent Comments