Path: blob/main/crypto/libecc/src/utils/print_buf.c
34889 views
/*1* Copyright (C) 2021 - This file is part of libecc project2*3* Authors:4* Ryad BENADJILA <[email protected]>5* Arnaud EBALARD <[email protected]>6*7* This software is licensed under a dual BSD and GPL v2 license.8* See LICENSE file at the root folder of the project.9*/10#include <libecc/utils/print_buf.h>11#include <libecc/external_deps/print.h>1213/* Print the buffer of a given size */14void buf_print(const char *msg, const u8 *buf, u16 buflen)15{16u32 i;1718if ((buf == NULL) || (msg == NULL)) {19goto err;20}2122ext_printf("%s: ", msg);23for (i = 0; i < (u32)buflen; i++) {24ext_printf("%02x", buf[i]);25}26ext_printf("\n");2728err:29return;30}313233