Nilorea Library
C utilities for networking, threading, graphics
n_crypto.h File Reference

vigenere encoding and decoding functions using N_STR/files More...

#include <stdlib.h>
#include <memory.h>
#include "nilorea/n_str.h"
+ Include dependency graph for n_crypto.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define n_mathmod(__a, __b)   ( (__a % __b + __b) % __b )
 The % operator returns a result that adopts the sign of the dividend, a true mathematical modulus adopts the sign of the divisor. More...
 

Functions

N_STRn_vigenere_decode (N_STR *string, N_STR *key)
 decode input using vigenere cypher and key More...
 
int n_vigenere_decode_file (N_STR *in, N_STR *out, N_STR *rootkey)
 directly vigenere decode a file using key More...
 
int n_vigenere_decode_file_qa (N_STR *in, N_STR *out, N_STR *question, N_STR *answer)
 directly vigenere decode a file using question and answer More...
 
N_STRn_vigenere_decode_qa (N_STR *input_data, N_STR *question, N_STR *answer)
 directly vigenere decode a file using key More...
 
N_STRn_vigenere_encode (N_STR *string, N_STR *key)
 encode input using vigenere cypher and key More...
 
int n_vigenere_encode_file (N_STR *in, N_STR *out, N_STR *rootkey)
 directly vigenere encode a file using key More...
 
int n_vigenere_encode_file_qa (N_STR *in, N_STR *out, N_STR *question, N_STR *answer)
 directly vigenere encode a file using question and answer More...
 
N_STRn_vigenere_encode_qa (N_STR *input_data, N_STR *question, N_STR *answer)
 directly vigenere encode a file using key More...
 
N_STRn_vigenere_get_answer (N_STR *root_key, N_STR *question)
 get an answer from a root key and a question More...
 
N_STRn_vigenere_get_question (size_t question_size)
 get a question generated from the current machine hardware (disk&cpu) More...
 
N_STRn_vigenere_get_rootkey (size_t rootkey_size)
 get a rootkey randomly generated More...
 
N_STRn_vigenere_quick_decode (N_STR *encoded_question)
 quick decode data More...
 
N_STRn_vigenere_quick_encode (N_STR *decoded_question)
 quick encode data More...
 

Detailed Description

vigenere encoding and decoding functions using N_STR/files

Author
Castagnier Mickael
Version
1.0
Date
10/11/2022

Definition in file n_crypto.h.