Table of Contents
- CYPHERS: VIGENERE (encode / decode) a (N_STR / file) with a root key or a combination of a question and an answer
- Functions
- Defines
- Functions Documentation
- function n_vigenere_quick_encode
- function n_vigenere_quick_decode
- function n_vigenere_get_rootkey
- function n_vigenere_get_question
- function n_vigenere_get_answer
- function n_vigenere_encode_qa
- function n_vigenere_encode_file_qa
- function n_vigenere_encode_file
- function n_vigenere_encode
- function n_vigenere_decode_qa
- function n_vigenere_decode_file_qa
- function n_vigenere_decode_file
- function n_vigenere_decode
- Macros Documentation
CYPHERS: VIGENERE (encode / decode) a (N_STR / file) with a root key or a combination of a question and an answer
Functions
| Name | |
|---|---|
| N_STR * | n_vigenere_quick_encode(N_STR * decoded_question) quick encode a N_STR using an auto-generated key |
| N_STR * | n_vigenere_quick_decode(N_STR * encoded_question) quick decode a N_STR using an auto-generated key |
| N_STR * | n_vigenere_get_rootkey(size_t rootkey_size) generate a random root key of given size |
| N_STR * | n_vigenere_get_question(size_t question_size) generate a random question of given size |
| N_STR * | n_vigenere_get_answer(N_STR * root_key, N_STR * question) compute the answer from a root key and a question |
| N_STR * | n_vigenere_encode_qa(N_STR * input_data, N_STR * question, N_STR * answer) encode a N_STR using vigenere cipher with a question and answer pair |
| int | n_vigenere_encode_file_qa(N_STR * in, N_STR * out, N_STR * question, N_STR * answer) encode a file using vigenere cipher with a question and answer pair |
| int | n_vigenere_encode_file(N_STR * in, N_STR * out, N_STR * rootkey) encode a file using vigenere cipher with a root key |
| N_STR * | n_vigenere_encode(N_STR * string, N_STR * key) encode a N_STR using vigenere cipher with the given key |
| N_STR * | n_vigenere_decode_qa(N_STR * input_data, N_STR * question, N_STR * answer) decode a N_STR using vigenere cipher with a question and answer pair |
| int | n_vigenere_decode_file_qa(N_STR * in, N_STR * out, N_STR * question, N_STR * answer) decode a file using vigenere cipher with a question and answer pair |
| int | n_vigenere_decode_file(N_STR * in, N_STR * out, N_STR * rootkey) decode a file using vigenere cipher with a root key |
| N_STR * | n_vigenere_decode(N_STR * string, N_STR * key) decode a N_STR using vigenere cipher with the given key |
Defines
| Name | |
|---|---|
| n_mathmod(__a, __b) The % operator returns a result that adopts the sign of the dividend, a true mathematical modulus adopts the sign of the divisor. |
Functions Documentation
function n_vigenere_quick_encode
N_STR * n_vigenere_quick_encode(
N_STR * decoded_question
)
quick encode a N_STR using an auto-generated key
Parameters:
- decoded_data the data to encode
Return: a N_STR *encoded_data
quick encode data
quick encode a N_STR using an auto-generated key
function n_vigenere_quick_decode
N_STR * n_vigenere_quick_decode(
N_STR * encoded_question
)
quick decode a N_STR using an auto-generated key
Parameters:
- encoded_data the data to decode
Return: a N_STR *decoded_data
quick decode data
quick decode a N_STR using an auto-generated key
function n_vigenere_get_rootkey
N_STR * n_vigenere_get_rootkey(
size_t rootkey_size
)
generate a random root key of given size
Parameters:
- rootkey_size size of the needed rootkey. Must be a multiple of 2
Return: a N_STR *rootkey string
get a rootkey randomly generated
generate a random root key of given size
function n_vigenere_get_question
N_STR * n_vigenere_get_question(
size_t question_size
)
generate a random question of given size
Parameters:
- question_size size of the needed question. Must be a multiple of 2
Return: a N_STR *question string
get a question generated from the current machine hardware (disk&cpu)
generate a random question of given size
function n_vigenere_get_answer
N_STR * n_vigenere_get_answer(
N_STR * root_key,
N_STR * question
)
compute the answer from a root key and a question
Parameters:
- root_key the key used to do the inital encoding
- question question generated from hardware
Return: a N_STR *answer_key string
get an answer from a root key and a question
compute the answer from a root key and a question
function n_vigenere_encode_qa
N_STR * n_vigenere_encode_qa(
N_STR * input_data,
N_STR * question,
N_STR * answer
)
encode a N_STR using vigenere cipher with a question and answer pair
Parameters:
- input_data input path and filename
- question question key to use
- answer answer key to use
Return: a N_STR *encoded string or NULL
directly vigenere encode a file using key
encode a N_STR using vigenere cipher with a question and answer pair
function n_vigenere_encode_file_qa
int n_vigenere_encode_file_qa(
N_STR * in,
N_STR * out,
N_STR * question,
N_STR * answer
)
encode a file using vigenere cipher with a question and answer pair
Parameters:
- in input path and filename
- out output path and filename
- question question key to use
- answer answer key to use
Return: TRUE or FALSE
directly vigenere encode a file using question and answer
encode a file using vigenere cipher with a question and answer pair
function n_vigenere_encode_file
int n_vigenere_encode_file(
N_STR * in,
N_STR * out,
N_STR * rootkey
)
encode a file using vigenere cipher with a root key
Parameters:
- in input path and filename
- out output path and filename
- key key to use
Return: TRUE or FALSE
directly vigenere encode a file using key
encode a file using vigenere cipher with a root key
function n_vigenere_encode
N_STR * n_vigenere_encode(
N_STR * string,
N_STR * key
)
encode a N_STR using vigenere cipher with the given key
Parameters:
- string source to encode
- key key to use for the encoding/decoding
Return: a N_STR *encoded
encode input using vigenere cypher and key
encode a N_STR using vigenere cipher with the given key
function n_vigenere_decode_qa
N_STR * n_vigenere_decode_qa(
N_STR * input_data,
N_STR * question,
N_STR * answer
)
decode a N_STR using vigenere cipher with a question and answer pair
Parameters:
- input_data input path and filename
- question question key to use
- answer answer key to use
Return: a N_STR *decoded string or NULL
directly vigenere decode a file using key
decode a N_STR using vigenere cipher with a question and answer pair
function n_vigenere_decode_file_qa
int n_vigenere_decode_file_qa(
N_STR * in,
N_STR * out,
N_STR * question,
N_STR * answer
)
decode a file using vigenere cipher with a question and answer pair
Parameters:
- in input path and filename
- out output path and filename
- question question key to use
- answer answer key to use
Return: TRUE or FALSE
directly vigenere decode a file using question and answer
decode a file using vigenere cipher with a question and answer pair
function n_vigenere_decode_file
int n_vigenere_decode_file(
N_STR * in,
N_STR * out,
N_STR * rootkey
)
decode a file using vigenere cipher with a root key
Parameters:
- in input path and filename
- out output path and filename
- key key to use
Return: TRUE or FALSE
directly vigenere decode a file using key
decode a file using vigenere cipher with a root key
function n_vigenere_decode
N_STR * n_vigenere_decode(
N_STR * string,
N_STR * key
)
decode a N_STR using vigenere cipher with the given key
Parameters:
- string source to decode
- key key to use for the encoding/decoding
Return: a N_STR *decoded
decode input using vigenere cypher and key
decode a N_STR using vigenere cipher with the given key
Macros Documentation
define n_mathmod
#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.
This method implements a mathematical modulus
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB