/* main-base64-test.c */
/*
This file is part of the AVR-Crypto-Lib.
Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
/*
* base64 test-suit
*
*/
#include "config.h"
#include "uart_i.h"
#include "debug.h"
#include "noekeon.h"
#include "noekeon_prng.h"
#include "base64_enc.h"
#include "base64_dec.h"
#include "cli.h"
#include "performance_test.h"
#include
#include
#include
char* algo_name = "Base64";
/*****************************************************************************
* additional validation-functions *
*****************************************************************************/
void testrun_stdtest_base64(void){
uint8_t fail=0;
uint8_t l,i;
int sl;
char str[10];
uint8_t bin_buffer[256];
char b64_buffer[256*4/3+10];
uint8_t bin_buffer2[256];
random_seed(bin_buffer);
for(l=0; l<255; ++l){
cli_putstr_P(PSTR("\r\nTest "));
utoa(l, str, 10);
cli_putstr(str);
for(i=0; i