#include "cli.h"
#include "string-extras.h"
+
#ifdef NESSIE_ALIVE
void nessie_send_alive(void){
cli_putc(NESSIE_ALIVE_CHAR);
#define SPACES 31
#define BYTESPERLINE 16
-void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B){
+void nessie_print_item(const char* name, uint8_t* buffer, uint16_t size_B){
uint8_t name_len;
uint8_t i;
name_len=strlen(name);
Block size: 128 bits
*/
-void nessie_print_header(char* name,
+void nessie_print_header(const char* name,
uint16_t keysize_b,
uint16_t blocksize_b,
uint16_t hashsize_b,
uint16_t i;
cli_putstr("\r\n\r\n"
"********************************************************************************\r\n"
- "* ARM-Crypto-Lib - crypto primitives for ARM microcontrolles by Daniel Otte *\r\n"
+ "* ARM-Crypto-Lib - crypto primitives for ARM microcontrollers by Daniel Otte *\r\n"
"********************************************************************************\r\n"
"\r\n");
+
cli_putstr("Primitive Name: ");
cli_putstr(name);
cli_putstr("\r\n");
for(i=0; i<16+strlen(name); ++i){
cli_putc('=');
}
- char str[6]; /* must catch numbers up to 65535 + terminatin \0 */
+ char str[6]; /* must catch numbers up to 65535 + terminating \0 */
if(keysize_b){
cli_putstr("\r\nKey size: ");
ustoa(keysize_b, str, 10);
cli_putstr(str);
cli_putstr(" bits");
}
+
if(macsize_b){
cli_putstr("\r\nMac size: ");
ustoa(macsize_b, str, 10);
if(ivsize_b){
if(ivsize_b==(uint16_t)-1){
cli_putstr("\r\nNo initial value (IV) mode");
- }
- {
+ }else{
cli_putstr("\r\nIV size: ");
ustoa(ivsize_b, str, 10);
cli_putstr(str);