#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; […]
#include <stdio.h>#include <openssl/err.h>#include <openssl/rand.h> int main(int argc, char* argv[]){ int i; int retVal = 0; // 랜덤 수의 길이는 64로 한다. int length = 64; // PRNG에 공급할 seed 생성 RAND_status(); // 생성할 […]
Recent Comments