6 static void test_b64_encode(const char *src
)
9 int r
= b64_encode(src
, strlen(src
), dst
, sizeof(dst
));
10 fprintf(stdout
, "%d %s\n", r
, dst
);
13 static void test_b64_decode(const char *src
)
16 int r
= b64_decode(src
, dst
, sizeof(dst
));
17 fprintf(stdout
, "%d %s\n", r
, dst
);
24 test_b64_encode("fo");
25 test_b64_encode("foo");
26 test_b64_encode("foob");
27 test_b64_encode("fooba");
28 test_b64_encode("foobar");
31 test_b64_decode("Zg==");
32 test_b64_decode("Zm8=");
33 test_b64_decode("Zm9v");
34 test_b64_decode("Zm9vYg==");
35 test_b64_decode("Zm9vYmE=");
36 test_b64_decode("Zm9vYmFy");