X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fu-boot%2Fsha1.h;h=09fee594d263fa94e1060cf113f9e603b521b99d;hb=ddd39d0cc1a025a1e2e3c792cc8286dbdfa29b54;hp=da09dab9769af05a80c7f42c42e1f489fe32cb66;hpb=e99f30e105a253ee64bef1ef83b86a47e0d3b6f1;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/u-boot/sha1.h b/include/u-boot/sha1.h index da09dab..09fee59 100644 --- a/include/u-boot/sha1.h +++ b/include/u-boot/sha1.h @@ -1,23 +1,10 @@ +/* SPDX-License-Identifier: LGPL-2.1 */ /** * \file sha1.h * based from http://xyssl.org/code/source/sha1/ * FIPS-180-1 compliant SHA-1 implementation * * Copyright (C) 2003-2006 Christophe Devine - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA */ /* * The SHA-1 standard was published by NIST in 1993. @@ -33,6 +20,9 @@ extern "C" { #define SHA1_SUM_POS -0x20 #define SHA1_SUM_LEN 20 +#define SHA1_DER_LEN 15 + +extern const uint8_t sha1_der_prefix[]; /** * \brief SHA-1 context structure @@ -40,7 +30,7 @@ extern "C" { typedef struct { unsigned long total[2]; /*!< number of bytes processed */ - unsigned long state[5]; /*!< intermediate digest state */ + uint32_t state[5]; /*!< intermediate digest state */ unsigned char buffer[64]; /*!< data block being processed */ } sha1_context;