trim trailing spaces
This commit is contained in:
parent
f9984d1e24
commit
50d10790e3
@ -10,16 +10,16 @@
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
/**
|
||||
@file pmac_init.c
|
||||
PMAC implementation, initialize state, by Tom St Denis
|
||||
PMAC implementation, initialize state, by Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PMAC
|
||||
|
||||
static const struct {
|
||||
int len;
|
||||
unsigned char poly_div[MAXBLOCKSIZE],
|
||||
unsigned char poly_div[MAXBLOCKSIZE],
|
||||
poly_mul[MAXBLOCKSIZE];
|
||||
} polys[] = {
|
||||
{
|
||||
@ -27,7 +27,7 @@ static const struct {
|
||||
{ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B }
|
||||
}, {
|
||||
16,
|
||||
16,
|
||||
{ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43 },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -39,7 +39,7 @@ static const struct {
|
||||
Initialize a PMAC state
|
||||
@param pmac The PMAC state to initialize
|
||||
@param cipher The index of the desired cipher
|
||||
@param key The secret key
|
||||
@param key The secret key
|
||||
@param keylen The length of the secret key (octets)
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
@ -59,7 +59,7 @@ int pmac_init(pmac_state *pmac, int cipher, const unsigned char *key, unsigned l
|
||||
/* determine which polys to use */
|
||||
pmac->block_len = cipher_descriptor[cipher].block_length;
|
||||
for (poly = 0; poly < (int)(sizeof(polys)/sizeof(polys[0])); poly++) {
|
||||
if (polys[poly].len == pmac->block_len) {
|
||||
if (polys[poly].len == pmac->block_len) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -78,7 +78,7 @@ int pmac_init(pmac_state *pmac, int cipher, const unsigned char *key, unsigned l
|
||||
if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &pmac->key)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* allocate L */
|
||||
L = XMALLOC(pmac->block_len);
|
||||
if (L == NULL) {
|
||||
|
@ -38,7 +38,7 @@ int ltc_init_multi(void **a, ...)
|
||||
cur = va_arg(args, void**);
|
||||
}
|
||||
va_end(args);
|
||||
return CRYPT_OK;
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
void ltc_deinit_multi(void *a, ...)
|
||||
|
@ -37,7 +37,7 @@ int der_encode_utf8_string(const wchar_t *in, unsigned long inlen,
|
||||
|
||||
/* get the size */
|
||||
for (x = len = 0; x < inlen; x++) {
|
||||
if (in[x] < 0 || in[x] > 0x1FFFF) {
|
||||
if (in[x] < 0 || in[x] > 0x1FFFF) {
|
||||
return CRYPT_INVALID_ARG;
|
||||
}
|
||||
len += der_utf8_charsize(in[x]);
|
||||
|
Loading…
Reference in New Issue
Block a user