Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
CYPHERS: BASE64 (encode / decode) (from / to) a N_STR *string

Functions

N_STRn_base64_decode (N_STR *bufcoded)
 decode a base64 encoded N_STR
 
N_STRn_base64_encode (N_STR *string)
 encode a N_STR to base64
 
bool n_isalpha (char c)
 check if a character is alphabetic
 
bool n_islower (char c)
 check if a character is lowercase
 
bool n_isupper (char c)
 check if a character is uppercase
 
char n_tolower (char c)
 convert a character to lowercase
 
char n_toupper (char c)
 convert a character to uppercase
 

Detailed Description

Function Documentation

◆ n_base64_decode()

N_STR * n_base64_decode ( N_STR bufcoded)

decode a base64 encoded N_STR

decode a base64 encoded N_STR

Parameters
bufcodedthe N_STR *string to decode
Returns
a new base64 N_STR *decoded string or NULL

Definition at line 187 of file n_base64.c.

References __n_assert, N_STR::data, LOG_ERR, n_log, new_nstr(), pr2six, and N_STR::written.

Referenced by main(), n_vigenere_decode_file(), n_vigenere_decode_qa(), and n_vigenere_quick_decode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ n_base64_encode()

N_STR * n_base64_encode ( N_STR input)

encode a N_STR to base64

encode a N_STR to base64

Parameters
inputthe N_STR *string to encode
Returns
a new base64 N_STR *encoded string or NULL

Definition at line 269 of file n_base64.c.

References __n_assert, basis_64, N_STR::data, free_nstr, LOG_ERR, n_base64_encode_len(), n_log, new_nstr(), and N_STR::written.

Referenced by main(), n_proxy_connect_tunnel(), n_proxy_connect_tunnel_ssl(), n_vigenere_encode_file(), n_vigenere_encode_qa(), n_vigenere_get_question(), n_vigenere_quick_encode(), and n_ws_connect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ n_isalpha()

bool n_isalpha ( char  c)

check if a character is alphabetic

check if a character is alphabetic

Parameters
ccharacter to look up
Returns
TRUE or FALSE

Definition at line 122 of file n_base64.c.

References ascii_lower_case_lookup_table, and ascii_upper_case_lookup_table.

Referenced by main().

+ Here is the caller graph for this function:

◆ n_islower()

bool n_islower ( char  c)

check if a character is lowercase

check if a character is lowercase

Parameters
ccharacter to look up
Returns
TRUE or FALSE

Definition at line 113 of file n_base64.c.

References ascii_lower_case_lookup_table.

Referenced by main(), and n_vigenere_cypher_thread().

+ Here is the caller graph for this function:

◆ n_isupper()

bool n_isupper ( char  c)

check if a character is uppercase

check if a character is uppercase

Parameters
ccharacter to look up
Returns
TRUE or FALSE

Definition at line 104 of file n_base64.c.

References ascii_upper_case_lookup_table.

Referenced by main(), and n_vigenere_cypher_thread().

+ Here is the caller graph for this function:

◆ n_tolower()

char n_tolower ( char  c)

convert a character to lowercase

convert a character to lowercase

Parameters
ccharacter to convert
Returns
lowercased char c

Definition at line 142 of file n_base64.c.

References ascii_upper_case_lookup_table.

Referenced by main(), and n_vigenere_cypher_thread().

+ Here is the caller graph for this function:

◆ n_toupper()

char n_toupper ( char  c)

convert a character to uppercase

convert a character to uppercase

Parameters
ccharacter to convert
Returns
uppercased char c

Definition at line 131 of file n_base64.c.

References ascii_lower_case_lookup_table.

Referenced by main(), and n_vigenere_cypher_thread().

+ Here is the caller graph for this function: