Slash and burn EOL whitespace everywhere
This commit is contained in:
parent
d64c963e5e
commit
02240eff8c
94 changed files with 1059 additions and 1059 deletions
|
@ -37,14 +37,14 @@
|
|||
#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y))))
|
||||
#endif
|
||||
|
||||
const uint64_t keccakf_rndc[24] =
|
||||
const uint64_t keccakf_rndc[24] =
|
||||
{
|
||||
0x0000000000000001, 0x0000000000008082, 0x800000000000808a,
|
||||
0x8000000080008000, 0x000000000000808b, 0x0000000080000001,
|
||||
0x8000000080008081, 0x8000000000008009, 0x000000000000008a,
|
||||
0x0000000000000088, 0x0000000080008009, 0x000000008000000a,
|
||||
0x000000008000808b, 0x800000000000008b, 0x8000000000008089,
|
||||
0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
|
||||
0x8000000000008003, 0x8000000000008002, 0x8000000000000080,
|
||||
0x000000000000800a, 0x800000008000000a, 0x8000000080008081,
|
||||
0x8000000000008080, 0x0000000080000001, 0x8000000080008008
|
||||
};
|
||||
|
@ -155,7 +155,7 @@ void xmrig::keccakf(uint64_t st[25], int rounds)
|
|||
st[j + 2] ^= (~bc[3]) & bc[4];
|
||||
st[j + 3] ^= (~bc[4]) & bc[0];
|
||||
st[j + 4] ^= (~bc[0]) & bc[1];
|
||||
|
||||
|
||||
// Iota
|
||||
st[0] ^= keccakf_rndc[round];
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ void xmrig::keccak(const uint8_t *in, int inlen, uint8_t *md, int mdlen)
|
|||
|
||||
rsiz = sizeof(state_t) == mdlen ? HASH_DATA_AREA : 200 - 2 * mdlen;
|
||||
rsizw = rsiz / 8;
|
||||
|
||||
|
||||
memset(st, 0, sizeof(st));
|
||||
|
||||
for ( ; inlen >= rsiz; inlen -= rsiz, in += rsiz) {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/* -------------------------------------------------------------------------
|
||||
* Works when compiled for either 32-bit or 64-bit targets, optimized for
|
||||
* Works when compiled for either 32-bit or 64-bit targets, optimized for
|
||||
* 64 bit.
|
||||
*
|
||||
* Canonical implementation of Init/Update/Finalize for SHA-3 byte input.
|
||||
* Canonical implementation of Init/Update/Finalize for SHA-3 byte input.
|
||||
*
|
||||
* SHA3-256, SHA3-384, SHA-512 are implemented. SHA-224 can easily be added.
|
||||
*
|
||||
* Based on code from http://keccak.noekeon.org/ .
|
||||
*
|
||||
* I place the code that I wrote into public domain, free to use.
|
||||
* I place the code that I wrote into public domain, free to use.
|
||||
*
|
||||
* I would appreciate if you give credits to this work if you used it to
|
||||
* I would appreciate if you give credits to this work if you used it to
|
||||
* write or test * your code.
|
||||
*
|
||||
* Aug 2015. Andrey Jivsov. crypto@brainhub.org
|
||||
|
@ -32,7 +32,7 @@
|
|||
#define SHA3_TRACE_BUF(format, buf, l, args...)
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
* This flag is used to configure "pure" Keccak, as opposed to NIST SHA3.
|
||||
*/
|
||||
#define SHA3_USE_KECCAK_FLAG 0x80000000
|
||||
|
@ -108,7 +108,7 @@ sha3_Update(void *priv, void const *bufIn, size_t len)
|
|||
SHA3_ASSERT(ctx->byteIndex < 8);
|
||||
SHA3_ASSERT(ctx->wordIndex < sizeof(ctx->s) / sizeof(ctx->s[0]));
|
||||
|
||||
if(len < old_tail) { /* have no complete word or haven't started
|
||||
if(len < old_tail) { /* have no complete word or haven't started
|
||||
* the word yet */
|
||||
SHA3_TRACE("because %d<%d, store it and return", (unsigned)len,
|
||||
(unsigned)old_tail);
|
||||
|
@ -180,7 +180,7 @@ sha3_Update(void *priv, void const *bufIn, size_t len)
|
|||
}
|
||||
|
||||
/* This is simply the 'update' with the padding block.
|
||||
* The padding block is 0x01 || 0x00* || 0x80. First 0x01 and last 0x80
|
||||
* The padding block is 0x01 || 0x00* || 0x80. First 0x01 and last 0x80
|
||||
* bytes are always present, but they can be the same byte.
|
||||
*/
|
||||
void const *
|
||||
|
@ -214,7 +214,7 @@ sha3_Finalize(void *priv)
|
|||
|
||||
/* Return first bytes of the ctx->s. This conversion is not needed for
|
||||
* little-endian platforms e.g. wrap with #if !defined(__BYTE_ORDER__)
|
||||
* || !defined(__ORDER_LITTLE_ENDIAN__) || __BYTE_ORDER__!=__ORDER_LITTLE_ENDIAN__
|
||||
* || !defined(__ORDER_LITTLE_ENDIAN__) || __BYTE_ORDER__!=__ORDER_LITTLE_ENDIAN__
|
||||
* ... the conversion below ...
|
||||
* #endif */
|
||||
{
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
#define SHA3_H
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Works when compiled for either 32-bit or 64-bit targets, optimized for
|
||||
* Works when compiled for either 32-bit or 64-bit targets, optimized for
|
||||
* 64 bit.
|
||||
*
|
||||
* Canonical implementation of Init/Update/Finalize for SHA-3 byte input.
|
||||
* Canonical implementation of Init/Update/Finalize for SHA-3 byte input.
|
||||
*
|
||||
* SHA3-256, SHA3-384, SHA-512 are implemented. SHA-224 can easily be added.
|
||||
*
|
||||
* Based on code from http://keccak.noekeon.org/ .
|
||||
*
|
||||
* I place the code that I wrote into public domain, free to use.
|
||||
* I place the code that I wrote into public domain, free to use.
|
||||
*
|
||||
* I would appreciate if you give credits to this work if you used it to
|
||||
* I would appreciate if you give credits to this work if you used it to
|
||||
* write or test * your code.
|
||||
*
|
||||
* Aug 2015. Andrey Jivsov. crypto@brainhub.org
|
||||
|
@ -65,9 +65,9 @@ void const *sha3_Finalize(void *priv);
|
|||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
sha3_return_t sha3_HashBuffer(
|
||||
sha3_return_t sha3_HashBuffer(
|
||||
unsigned bitSize, /* 256, 384, 512 */
|
||||
enum SHA3_FLAGS flags, /* SHA3_FLAGS_NONE or SHA3_FLAGS_KECCAK */
|
||||
const void *in, unsigned inBytes,
|
||||
const void *in, unsigned inBytes,
|
||||
void *out, unsigned outBytes ); /* up to bitSize/8; truncation OK */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue