* [including the GNU Public Licence.]
*/
-#include "cast.h"
+#include <openssl/cast.h>
#include "cast_lcl.h"
#include "cast_s.h"
#define S6 CAST_S_table6
#define S7 CAST_S_table7
-void CAST_set_key(key,len,data)
-CAST_KEY *key;
-int len;
-unsigned char *data;
+void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data)
{
CAST_LONG x[16];
CAST_LONG z[16];
if (len > 16) len=16;
for (i=0; i<len; i++)
x[i]=data[i];
+ if(len <= 10)
+ key->short_key=1;
+ else
+ key->short_key=0;
K= &k[0];
X[0]=((x[ 0]<<24)|(x[ 1]<<16)|(x[ 2]<<8)|x[ 3])&0xffffffffL;