* libcsa.c: CSA scrambler/descrambler
*****************************************************************************
* Copyright (C) 2004-2005 Laurent Aimar
- * $Id$
+ * Copyright (C) the deCSA authors
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Jean-Paul Saman <jpsaman #_at_# m2x.nl>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-/*
- * XXX: A great part is just a copy/past of deCSA but I can't find the
- * author and the license. If there is a problem with it please e-mail me.
- */
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
*****************************************************************************/
csa_t *csa_New( void )
{
- csa_t *c = malloc( sizeof( csa_t ) );
- memset( c, 0, sizeof( csa_t ) );
-
- return c;
+ return calloc( 1, sizeof( csa_t ) );
}
/*****************************************************************************
* csa_Delete:
*****************************************************************************/
-void csa_Delete( csa_t *c )
+void csa_Delete( csa_t *c )
{
free( c );
}
}
else
{
-#ifndef UNDER_CE
uint64_t i_ck = strtoull( psz_ck, NULL, 16 );
-#else
- uint64_t i_ck = strtoll( psz_ck, NULL, 16 );
-#endif
uint8_t ck[8];
int i;