added libtomcrypt-1.03
This commit is contained in:
committed by
Steffen Jaeckel
parent
65c1317eee
commit
3964a6523a
@@ -102,6 +102,12 @@ int pelican_process(pelican_state *pelmac, const unsigned char *in, unsigned lon
|
||||
|
||||
LTC_ARGCHK(pelmac != NULL);
|
||||
LTC_ARGCHK(in != NULL);
|
||||
|
||||
/* check range */
|
||||
if (pelmac->buflen < 0 || pelmac->buflen > 15) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
#ifdef LTC_FAST
|
||||
if (pelmac->buflen == 0) {
|
||||
while (inlen & ~15) {
|
||||
@@ -136,6 +142,12 @@ int pelican_done(pelican_state *pelmac, unsigned char *out)
|
||||
{
|
||||
LTC_ARGCHK(pelmac != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
|
||||
/* check range */
|
||||
if (pelmac->buflen < 0 || pelmac->buflen > 16) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (pelmac->buflen == 16) {
|
||||
four_rounds(pelmac);
|
||||
pelmac->buflen = 0;
|
||||
@@ -147,3 +159,7 @@ int pelican_done(pelican_state *pelmac, unsigned char *out)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -53,3 +53,7 @@ int pelican_memory(const unsigned char *key, unsigned long keylen,
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
@@ -114,3 +114,7 @@ int pelican_test(void)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* $Source$ */
|
||||
/* $Revision$ */
|
||||
/* $Date$ */
|
||||
|
||||
Reference in New Issue
Block a user