Defines

SecureHash256.cpp File Reference

#include <zeusbase/Security/SecureHash256.h>
#include <zeusbase/Security/SecurityDefines.hpp>

Defines

#define SHA256_F1(x)   (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
#define SHA256_F2(x)   (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
#define SHA256_F3(x)   (ROTR(x, 7) ^ ROTR(x, 18) ^ SHFR(x, 3))
#define SHA256_F4(x)   (ROTR(x, 17) ^ ROTR(x, 19) ^ SHFR(x, 10))
#define SHA256_SCR(i)   { w[i] = SHA256_F4(w[i - 2]) + w[i - 7] + SHA256_F3(w[i - 15]) + w[i - 16]; }
#define SHA256_EXP(a, b, c, d, e, f, g, h, j)

Define Documentation

#define SHA256_EXP (   a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
 
)
Value:
{                                                                               \
    t1 = wv[h] + SHA256_F2(wv[e]) + CH(wv[e], wv[f], wv[g]) + m_ulSHA256_k[j] + w[j]; \
    t2 = SHA256_F1(wv[a]) + MAJ(wv[a], wv[b], wv[c]);                             \
    wv[d] += t1;                                                                  \
    wv[h]  = t1 + t2;                                                             \
  }
#define SHA256_F1 (   x )    (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
#define SHA256_F2 (   x )    (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
#define SHA256_F3 (   x )    (ROTR(x, 7) ^ ROTR(x, 18) ^ SHFR(x, 3))
#define SHA256_F4 (   x )    (ROTR(x, 17) ^ ROTR(x, 19) ^ SHFR(x, 10))
#define SHA256_SCR (   i )    { w[i] = SHA256_F4(w[i - 2]) + w[i - 7] + SHA256_F3(w[i - 15]) + w[i - 16]; }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:21