#include <freeradius-devel/util/acutest.h>
#include <freeradius-devel/util/acutest_helpers.h>
#include "base16.h"
#include "base32.h"
#include "base64.h"
Go to the source code of this file.
◆ test_vector
◆ test_vector.cleartext
struct test_vector.cleartext |
◆ test_vector.encoded
struct test_vector.encoded |
◆ test_base16_decode()
static void test_base16_decode |
( |
void |
| ) |
|
|
static |
◆ test_base16_encode()
static void test_base16_encode |
( |
void |
| ) |
|
|
static |
◆ test_base32_decode()
static void test_base32_decode |
( |
void |
| ) |
|
|
static |
◆ test_base32_encode()
static void test_base32_encode |
( |
void |
| ) |
|
|
static |
◆ test_base32_hex_decode()
static void test_base32_hex_decode |
( |
void |
| ) |
|
|
static |
◆ test_base32_hex_encode()
static void test_base32_hex_encode |
( |
void |
| ) |
|
|
static |
◆ test_base64_decode()
static void test_base64_decode |
( |
void |
| ) |
|
|
static |
◆ test_base64_encode()
static void test_base64_encode |
( |
void |
| ) |
|
|
static |
◆ base16_vectors
Initial value:= {
{
L(
"foo"),
L(
"666f6f") },
{
L(
"foob"),
L(
"666f6f62") },
{
L(
"fooba"),
L(
"666f6f6261") },
{
L(
"foobar"),
L(
"666f6f626172") }
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition at line 21 of file base_16_32_64_tests.c.
◆ base32_hex_vectors
Initial value:= {
{
L(
"f"),
L(
"CO======") },
{
L(
"fo"),
L(
"CPNG====") },
{
L(
"foo"),
L(
"CPNMU===") },
{
L(
"foob"),
L(
"CPNMUOG=") },
{
L(
"fooba"),
L(
"CPNMUOJ1") },
{
L(
"foobar"),
L(
"CPNMUOJ1E8======") }
}
Definition at line 41 of file base_16_32_64_tests.c.
◆ base32_vectors
Initial value:= {
{
L(
"f"),
L(
"MY======") },
{
L(
"fo"),
L(
"MZXQ====") },
{
L(
"foo"),
L(
"MZXW6===") },
{
L(
"foob"),
L(
"MZXW6YQ=") },
{
L(
"fooba"),
L(
"MZXW6YTB") },
{
L(
"foobar"),
L(
"MZXW6YTBOI======") }
}
Definition at line 31 of file base_16_32_64_tests.c.
◆ base64_vectors
Initial value:= {
{
L(
"foob"),
L(
"Zm9vYg==") },
{
L(
"fooba"),
L(
"Zm9vYmE=") },
{
L(
"foobar"),
L(
"Zm9vYmFy") }
}
Definition at line 51 of file base_16_32_64_tests.c.
◆ TEST_LIST
Initial value:= {
{ NULL }
}
static void test_base64_decode(void)
static void test_base64_encode(void)
static void test_base16_encode(void)
static void test_base32_hex_encode(void)
static void test_base32_encode(void)
static void test_base32_hex_decode(void)
static void test_base32_decode(void)
static void test_base16_decode(void)
Definition at line 246 of file base_16_32_64_tests.c.