X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Faes.cpp;h=b490f7716d83c1971c5c9567e6ea80dc14fe9170;hb=59b1a8955142935b02af6446005ab47fc7c3fc8c;hp=c9189d68f25717351b12be62a05c8ef1fa4db0fb;hpb=9dd135acebad937b70a579de4686b871560e90f2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/aes.cpp b/src/aes.cpp index c9189d68f..b490f7716 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -1,5 +1,21 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. + * E-mail: + * + * + * + * Written by Craig Edwards, Craig McLure, and others. + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ -//Rijndael.cpp +// Based on existing implementations of the industry standard AES algorithms +// in the public domain. #include #include "aes.h" @@ -1389,7 +1405,7 @@ static const char base64val[] = { BAD, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,BAD, BAD,BAD,BAD,BAD }; -#define DECODE64(c) (isascii(c) ? base64val[c] : BAD) +#define DECODE64(c) (c < 128 ? base64val[c] : BAD) void to64frombits(unsigned char *out, const unsigned char *in, int inlen) /* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */