Browse Source

sha256: note about bitcoin input data

nfactor-troky
Jeff Garzik 14 years ago committed by Jeff Garzik
parent
commit
e33abcdbe4
  1. 3
      sha256_generic.c

3
sha256_generic.c

@ -46,6 +46,9 @@ static inline u32 Maj(u32 x, u32 y, u32 z)
static inline void LOAD_OP(int I, u32 *W, const u8 *input) static inline void LOAD_OP(int I, u32 *W, const u8 *input)
{ {
/* byteswap is commented out, because bitcoin input
* is already big-endian
*/
W[I] = /* ntohl */ ( ((u32*)(input))[I] ); W[I] = /* ntohl */ ( ((u32*)(input))[I] );
} }

Loading…
Cancel
Save