Macros | Functions | Variables
Sha1.cpp File Reference
#include <string.h>
#include <stdio.h>
#include <rms/util/Sha1.h>

Go to the source code of this file.

Macros

#define _CRT_SECURE_NO_DEPRECATE   1
 
#define GET_UINT32_BE(n, b, i)
 
#define PUT_UINT32_BE(n, b, i)
 
#define S(x, n)   ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
 
#define R(t)
 
#define P(a, b, c, d, e, x)
 
#define F(x, y, z)   (z ^ (x & (y ^ z)))
 
#define K   0x5A827999
 
#define F(x, y, z)   (x ^ y ^ z)
 
#define K   0x6ED9EBA1
 
#define F(x, y, z)   ((x & y) | (z & (x | y)))
 
#define K   0x8F1BBCDC
 
#define F(x, y, z)   (x ^ y ^ z)
 
#define K   0xCA62C1D6
 

Functions

void sha1_forRMS_starts (sha1_forRMS_context *ctx)
 SHA-1 context setup. More...
 
static void sha1_forRMS_process (sha1_forRMS_context *ctx, unsigned char data[64])
 
void sha1_forRMS_update (sha1_forRMS_context *ctx, unsigned char *input, int ilen)
 SHA-1 process buffer. More...
 
void sha1_forRMS_finish (sha1_forRMS_context *ctx, unsigned char output[20])
 SHA-1 final digest. More...
 
int sha1_forRMS_file (char *path, unsigned char output[20])
 Output = SHA-1( file contents ) More...
 
void sha1_forRMS_csum (unsigned char *input, int ilen, unsigned char output[20])
 Output = SHA-1( input buffer ) More...
 
void sha1_forRMS_hmac (unsigned char *key, int keylen, unsigned char *input, int ilen, unsigned char output[20])
 Output = HMAC-SHA-1( input buffer, hmac key ) More...
 
int sha1_forRMS_self_test (void)
 Checkup routine. More...
 

Variables

static const unsigned char sha1_forRMS_padding [64]
 

Macro Definition Documentation

#define _CRT_SECURE_NO_DEPRECATE   1

Definition at line 27 of file Sha1.cpp.

#define F (   x,
  y,
  z 
)    (z ^ (x & (y ^ z)))
#define F (   x,
  y,
  z 
)    (x ^ y ^ z)
#define F (   x,
  y,
  z 
)    ((x & y) | (z & (x | y)))
#define F (   x,
  y,
  z 
)    (x ^ y ^ z)
#define GET_UINT32_BE (   n,
  b,
 
)
Value:
{ \
(n) = ( (unsigned long) (b)[(i) ] << 24 ) \
| ( (unsigned long) (b)[(i) + 1] << 16 ) \
| ( (unsigned long) (b)[(i) + 2] << 8 ) \
| ( (unsigned long) (b)[(i) + 3] ); \
}
const hit & b
Definition: hits.cxx:21

Definition at line 39 of file Sha1.cpp.

Referenced by sha1_forRMS_process().

#define K   0x5A827999
#define K   0x6ED9EBA1
#define K   0x8F1BBCDC
#define K   0xCA62C1D6
#define P (   a,
  b,
  c,
  d,
  e,
  x 
)
Value:
{ \
e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \
}
#define F(x, y, z)
#define S(x, n)
#define K
const double a
Float_t d
Definition: plot.C:236
const hit & b
Definition: hits.cxx:21

Referenced by osc::_OscCalcDMP< T >::_OscCalcDMP(), osc::_PMNS_DMP< T >::_PMNS_DMP(), slicer::S4DParamCalc::analyze(), genie::HadronizationModelBase::ApplyRijk(), stan::math::bernoulli_cdf(), stan::math::bernoulli_lccdf(), stan::math::bernoulli_lcdf(), stan::math::beta_binomial_cdf(), stan::math::beta_binomial_lccdf(), stan::math::beta_binomial_lcdf(), stan::math::beta_cdf(), BicountEllipse_dCP(), stan::math::binomial_cdf(), stan::math::binomial_lccdf(), stan::math::binomial_lcdf(), BiprobEllipse_dCP(), stan::math::cauchy_cdf(), genie::GMCJDriver::ComputeEventProbability(), ConvertToGTracker(), genie::utils::phys::FormationZone(), lem::Library::FromTrees(), stan::math::gamma_cdf(), stan::math::gamma_lccdf(), stan::math::gamma_lcdf(), om::HitMaps::GetNanoSliceSummary(), genie::utils::hadxs::InelasticPionNucleonXSec(), stan::math::inv_chi_square_cdf(), stan::math::inv_chi_square_lccdf(), stan::math::inv_chi_square_lcdf(), stan::math::inv_gamma_cdf(), stan::math::inv_gamma_lccdf(), stan::math::inv_gamma_lcdf(), levy_func_problem(), stan::math::log_modified_bessel_first_kind(), stan::math::logistic_cdf(), stan::math::logistic_lccdf(), stan::math::logistic_lcdf(), genie::KNOHadronization::MultiplicityProb(), stan::math::neg_binomial_2_cdf(), stan::math::neg_binomial_cdf(), stan::math::neg_binomial_lccdf(), stan::math::neg_binomial_lcdf(), osc::OscCalcPMNSOptEigen::OscCalcPMNSOptEigen(), osc::_IOscCalc< T >::P(), osc::_OscCalcDMP< T >::P(), osc::_PMNS_DMP< T >::P(), stan::math::pareto_cdf(), stan::math::pareto_lccdf(), stan::math::pareto_lcdf(), stan::math::pareto_type_2_cdf(), stan::math::pareto_type_2_lccdf(), stan::math::pareto_type_2_lcdf(), plot_multiplicity_prob(), stan::math::poisson_cdf(), stan::math::poisson_lccdf(), stan::math::poisson_lcdf(), prob_biprob_pedagogical(), Prob_me(), prob_method0(), prob_method1(), prob_method2(), art::ProductRegistryHelper::produces(), art::MixHelper::produces(), art::rangeSetFor(), art::ProductRegistryHelper::reconstitutes(), stan::math::scaled_inv_chi_square_cdf(), stan::math::scaled_inv_chi_square_lccdf(), stan::math::scaled_inv_chi_square_lcdf(), trk::KalmanTrack::SegmentFinder(), beamlinereco::CFDHitFinder< T >::SetWaveform(), sha1_forRMS_process(), trk::KalmanTrack::SingleSegment(), osc::SolveCubic(), stan::math::student_t_cdf(), stan::math::student_t_lccdf(), stan::math::student_t_lcdf(), TheoryEllipse_dCP(), genie::utils::hadxs::TotalPionNucleonXSec(), bpfit::Path::TPBG(), genie::NievesSimoVacasMECPXSec2016::XSec(), and daqchannelmap::HardwareDisplay::XYPix().

#define PUT_UINT32_BE (   n,
  b,
 
)
Value:
{ \
(b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
(b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
(b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
(b)[(i) + 3] = (unsigned char) ( (n) ); \
}
const hit & b
Definition: hits.cxx:21

Definition at line 48 of file Sha1.cpp.

Referenced by sha1_forRMS_finish().

#define R (   t)
Value:
( \
temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ \
W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \
( W[t & 0x0F] = S(temp,1) ) \
)
#define S(x, n)
#define W(x)

Referenced by sha1_forRMS_process().

#define S (   x,
  n 
)    ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))

Function Documentation

void sha1_forRMS_csum ( unsigned char *  input,
int  ilen,
unsigned char  output[20] 
)

Output = SHA-1( input buffer )

Parameters
inputbuffer holding the data
ilenlength of the input data
outputSHA-1 checksum result

Definition at line 338 of file Sha1.cpp.

References sha1_forRMS_finish(), sha1_forRMS_starts(), and sha1_forRMS_update().

340 {
342 
343  sha1_forRMS_starts( &ctx );
344  sha1_forRMS_update( &ctx, input, ilen );
345  sha1_forRMS_finish( &ctx, output );
346 }
ofstream output
void sha1_forRMS_update(sha1_forRMS_context *ctx, unsigned char *input, int ilen)
SHA-1 process buffer.
Definition: Sha1.cpp:232
void sha1_forRMS_starts(sha1_forRMS_context *ctx)
SHA-1 context setup.
Definition: Sha1.cpp:60
SHA-1 context structure.
Definition: Sha1.h:14
void sha1_forRMS_finish(sha1_forRMS_context *ctx, unsigned char output[20])
SHA-1 final digest.
Definition: Sha1.cpp:285
int sha1_forRMS_file ( char *  path,
unsigned char  output[20] 
)

Output = SHA-1( file contents )

Parameters
pathinput file name
outputSHA-1 checksum result
Returns
0 if successful, or 1 if fopen failed

Definition at line 314 of file Sha1.cpp.

References MakeMiniprodValidationCuts::f, fclose(), getGoodRuns4SAM::n, sha1_forRMS_finish(), sha1_forRMS_starts(), and sha1_forRMS_update().

315 {
316  FILE *f;
317  size_t n;
319  unsigned char buf[1024];
320 
321  if( ( f = fopen( path, "rb" ) ) == NULL )
322  return( 1 );
323 
324  sha1_forRMS_starts( &ctx );
325 
326  while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
327  sha1_forRMS_update( &ctx, buf, (int) n );
328 
329  sha1_forRMS_finish( &ctx, output );
330 
331  fclose( f );
332  return( 0 );
333 }
ofstream output
void sha1_forRMS_update(sha1_forRMS_context *ctx, unsigned char *input, int ilen)
SHA-1 process buffer.
Definition: Sha1.cpp:232
void sha1_forRMS_starts(sha1_forRMS_context *ctx)
SHA-1 context setup.
Definition: Sha1.cpp:60
SHA-1 context structure.
Definition: Sha1.h:14
fclose(fg1)
const std::string path
Definition: plot_BEN.C:43
void sha1_forRMS_finish(sha1_forRMS_context *ctx, unsigned char output[20])
SHA-1 final digest.
Definition: Sha1.cpp:285
void sha1_forRMS_finish ( sha1_forRMS_context ctx,
unsigned char  output[20] 
)

SHA-1 final digest.

Parameters
ctxSHA-1 context
outputSHA-1 checksum result

Definition at line 285 of file Sha1.cpp.

References PUT_UINT32_BE, sha1_forRMS_padding, sha1_forRMS_update(), sha1_forRMS_context::state, and sha1_forRMS_context::total.

Referenced by sha1_forRMS_csum(), sha1_forRMS_file(), sha1_forRMS_hmac(), and gov::fnal::cd::rms::util::UUIDGenerator::UUIDGenerator().

286 {
287  unsigned long last, padn;
288  unsigned long high, low;
289  unsigned char msglen[8];
290 
291  high = ( ctx->total[0] >> 29 )
292  | ( ctx->total[1] << 3 );
293  low = ( ctx->total[0] << 3 );
294 
295  PUT_UINT32_BE( high, msglen, 0 );
296  PUT_UINT32_BE( low, msglen, 4 );
297 
298  last = ctx->total[0] & 0x3F;
299  padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
300 
301  sha1_forRMS_update( ctx, (unsigned char *) sha1_forRMS_padding, padn );
302  sha1_forRMS_update( ctx, msglen, 8 );
303 
304  PUT_UINT32_BE( ctx->state[0], output, 0 );
305  PUT_UINT32_BE( ctx->state[1], output, 4 );
306  PUT_UINT32_BE( ctx->state[2], output, 8 );
307  PUT_UINT32_BE( ctx->state[3], output, 12 );
308  PUT_UINT32_BE( ctx->state[4], output, 16 );
309 }
unsigned long state[5]
Definition: Sha1.h:17
ofstream output
void sha1_forRMS_update(sha1_forRMS_context *ctx, unsigned char *input, int ilen)
SHA-1 process buffer.
Definition: Sha1.cpp:232
#define PUT_UINT32_BE(n, b, i)
Definition: Sha1.cpp:48
unsigned long total[2]
Definition: Sha1.h:16
static const unsigned char sha1_forRMS_padding[64]
Definition: Sha1.cpp:274
void sha1_forRMS_hmac ( unsigned char *  key,
int  keylen,
unsigned char *  input,
int  ilen,
unsigned char  output[20] 
)

Output = HMAC-SHA-1( input buffer, hmac key )

Parameters
keyHMAC secret key
keylenlength of the HMAC key
inputbuffer holding the data
ilenlength of the input data
outputHMAC-SHA-1 result

Definition at line 351 of file Sha1.cpp.

References MECModelEnuComparisons::i, calib::j, printf(), sha1_forRMS_finish(), sha1_forRMS_self_test(), sha1_forRMS_starts(), and sha1_forRMS_update().

354 {
355  int i;
357  unsigned char k_ipad[64];
358  unsigned char k_opad[64];
359  unsigned char tmpbuf[20];
360 
361  memset( k_ipad, 0x36, 64 );
362  memset( k_opad, 0x5C, 64 );
363 
364  for( i = 0; i < keylen; i++ )
365  {
366  if( i >= 64 ) break;
367 
368  k_ipad[i] ^= key[i];
369  k_opad[i] ^= key[i];
370  }
371 
372  sha1_forRMS_starts( &ctx );
373  sha1_forRMS_update( &ctx, k_ipad, 64 );
374  sha1_forRMS_update( &ctx, input, ilen );
375  sha1_forRMS_finish( &ctx, tmpbuf );
376 
377  sha1_forRMS_starts( &ctx );
378  sha1_forRMS_update( &ctx, k_opad, 64 );
379  sha1_forRMS_update( &ctx, tmpbuf, 20 );
380  sha1_forRMS_finish( &ctx, output );
381 
382  memset( k_ipad, 0, 64 );
383  memset( k_opad, 0, 64 );
384  memset( tmpbuf, 0, 20 );
385  memset( &ctx, 0, sizeof( sha1_forRMS_context ) );
386 }
ofstream output
void sha1_forRMS_update(sha1_forRMS_context *ctx, unsigned char *input, int ilen)
SHA-1 process buffer.
Definition: Sha1.cpp:232
void sha1_forRMS_starts(sha1_forRMS_context *ctx)
SHA-1 context setup.
Definition: Sha1.cpp:60
SHA-1 context structure.
Definition: Sha1.h:14
void sha1_forRMS_finish(sha1_forRMS_context *ctx, unsigned char output[20])
SHA-1 final digest.
Definition: Sha1.cpp:285
static void sha1_forRMS_process ( sha1_forRMS_context ctx,
unsigned char  data[64] 
)
static

Definition at line 72 of file Sha1.cpp.

References genie::units::A, C, E, GET_UINT32_BE, P, R, sha1_forRMS_context::state, APDHVSetting::temp, and W.

Referenced by sha1_forRMS_update().

74 {
75  unsigned long temp, W[16], A, B, C, D, E;
76 
77  GET_UINT32_BE( W[0], data, 0 );
78  GET_UINT32_BE( W[1], data, 4 );
79  GET_UINT32_BE( W[2], data, 8 );
80  GET_UINT32_BE( W[3], data, 12 );
81  GET_UINT32_BE( W[4], data, 16 );
82  GET_UINT32_BE( W[5], data, 20 );
83  GET_UINT32_BE( W[6], data, 24 );
84  GET_UINT32_BE( W[7], data, 28 );
85  GET_UINT32_BE( W[8], data, 32 );
86  GET_UINT32_BE( W[9], data, 36 );
87  GET_UINT32_BE( W[10], data, 40 );
88  GET_UINT32_BE( W[11], data, 44 );
89  GET_UINT32_BE( W[12], data, 48 );
90  GET_UINT32_BE( W[13], data, 52 );
91  GET_UINT32_BE( W[14], data, 56 );
92  GET_UINT32_BE( W[15], data, 60 );
93 
94 #define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
95 
96 #define R(t) \
97 ( \
98  temp = W[(t - 3) & 0x0F] ^ W[(t - 8) & 0x0F] ^ \
99  W[(t - 14) & 0x0F] ^ W[ t & 0x0F], \
100  ( W[t & 0x0F] = S(temp,1) ) \
101 )
102 
103 #define P(a,b,c,d,e,x) \
104 { \
105  e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \
106 }
107 
108  A = ctx->state[0];
109  B = ctx->state[1];
110  C = ctx->state[2];
111  D = ctx->state[3];
112  E = ctx->state[4];
113 
114 #define F(x,y,z) (z ^ (x & (y ^ z)))
115 #define K 0x5A827999
116 
117  P( A, B, C, D, E, W[0] );
118  P( E, A, B, C, D, W[1] );
119  P( D, E, A, B, C, W[2] );
120  P( C, D, E, A, B, W[3] );
121  P( B, C, D, E, A, W[4] );
122  P( A, B, C, D, E, W[5] );
123  P( E, A, B, C, D, W[6] );
124  P( D, E, A, B, C, W[7] );
125  P( C, D, E, A, B, W[8] );
126  P( B, C, D, E, A, W[9] );
127  P( A, B, C, D, E, W[10] );
128  P( E, A, B, C, D, W[11] );
129  P( D, E, A, B, C, W[12] );
130  P( C, D, E, A, B, W[13] );
131  P( B, C, D, E, A, W[14] );
132  P( A, B, C, D, E, W[15] );
133  P( E, A, B, C, D, R(16) );
134  P( D, E, A, B, C, R(17) );
135  P( C, D, E, A, B, R(18) );
136  P( B, C, D, E, A, R(19) );
137 
138 #undef K
139 #undef F
140 
141 #define F(x,y,z) (x ^ y ^ z)
142 #define K 0x6ED9EBA1
143 
144  P( A, B, C, D, E, R(20) );
145  P( E, A, B, C, D, R(21) );
146  P( D, E, A, B, C, R(22) );
147  P( C, D, E, A, B, R(23) );
148  P( B, C, D, E, A, R(24) );
149  P( A, B, C, D, E, R(25) );
150  P( E, A, B, C, D, R(26) );
151  P( D, E, A, B, C, R(27) );
152  P( C, D, E, A, B, R(28) );
153  P( B, C, D, E, A, R(29) );
154  P( A, B, C, D, E, R(30) );
155  P( E, A, B, C, D, R(31) );
156  P( D, E, A, B, C, R(32) );
157  P( C, D, E, A, B, R(33) );
158  P( B, C, D, E, A, R(34) );
159  P( A, B, C, D, E, R(35) );
160  P( E, A, B, C, D, R(36) );
161  P( D, E, A, B, C, R(37) );
162  P( C, D, E, A, B, R(38) );
163  P( B, C, D, E, A, R(39) );
164 
165 #undef K
166 #undef F
167 
168 #define F(x,y,z) ((x & y) | (z & (x | y)))
169 #define K 0x8F1BBCDC
170 
171  P( A, B, C, D, E, R(40) );
172  P( E, A, B, C, D, R(41) );
173  P( D, E, A, B, C, R(42) );
174  P( C, D, E, A, B, R(43) );
175  P( B, C, D, E, A, R(44) );
176  P( A, B, C, D, E, R(45) );
177  P( E, A, B, C, D, R(46) );
178  P( D, E, A, B, C, R(47) );
179  P( C, D, E, A, B, R(48) );
180  P( B, C, D, E, A, R(49) );
181  P( A, B, C, D, E, R(50) );
182  P( E, A, B, C, D, R(51) );
183  P( D, E, A, B, C, R(52) );
184  P( C, D, E, A, B, R(53) );
185  P( B, C, D, E, A, R(54) );
186  P( A, B, C, D, E, R(55) );
187  P( E, A, B, C, D, R(56) );
188  P( D, E, A, B, C, R(57) );
189  P( C, D, E, A, B, R(58) );
190  P( B, C, D, E, A, R(59) );
191 
192 #undef K
193 #undef F
194 
195 #define F(x,y,z) (x ^ y ^ z)
196 #define K 0xCA62C1D6
197 
198  P( A, B, C, D, E, R(60) );
199  P( E, A, B, C, D, R(61) );
200  P( D, E, A, B, C, R(62) );
201  P( C, D, E, A, B, R(63) );
202  P( B, C, D, E, A, R(64) );
203  P( A, B, C, D, E, R(65) );
204  P( E, A, B, C, D, R(66) );
205  P( D, E, A, B, C, R(67) );
206  P( C, D, E, A, B, R(68) );
207  P( B, C, D, E, A, R(69) );
208  P( A, B, C, D, E, R(70) );
209  P( E, A, B, C, D, R(71) );
210  P( D, E, A, B, C, R(72) );
211  P( C, D, E, A, B, R(73) );
212  P( B, C, D, E, A, R(74) );
213  P( A, B, C, D, E, R(75) );
214  P( E, A, B, C, D, R(76) );
215  P( D, E, A, B, C, R(77) );
216  P( C, D, E, A, B, R(78) );
217  P( B, C, D, E, A, R(79) );
218 
219 #undef K
220 #undef F
221 
222  ctx->state[0] += A;
223  ctx->state[1] += B;
224  ctx->state[2] += C;
225  ctx->state[3] += D;
226  ctx->state[4] += E;
227 }
unsigned long state[5]
Definition: Sha1.h:17
#define GET_UINT32_BE(n, b, i)
Definition: Sha1.cpp:39
const XML_Char const XML_Char * data
Definition: expat.h:268
#define P(a, b, c, d, e, x)
const double C
Float_t E
Definition: plot.C:20
#define R(t)
static const double A
Definition: Units.h:82
#define W(x)
int sha1_forRMS_self_test ( void  )

Checkup routine.

Returns
0 if successful, or 1 if the test failed

Definition at line 450 of file Sha1.cpp.

Referenced by sha1_forRMS_hmac().

451 {
452  return( 0 );
453 }
void sha1_forRMS_starts ( sha1_forRMS_context ctx)

SHA-1 context setup.

Parameters
ctxSHA-1 context to be initialized

Definition at line 60 of file Sha1.cpp.

References sha1_forRMS_context::state, and sha1_forRMS_context::total.

Referenced by sha1_forRMS_csum(), sha1_forRMS_file(), sha1_forRMS_hmac(), and gov::fnal::cd::rms::util::UUIDGenerator::UUIDGenerator().

61 {
62  ctx->total[0] = 0;
63  ctx->total[1] = 0;
64 
65  ctx->state[0] = 0x67452301;
66  ctx->state[1] = 0xEFCDAB89;
67  ctx->state[2] = 0x98BADCFE;
68  ctx->state[3] = 0x10325476;
69  ctx->state[4] = 0xC3D2E1F0;
70 }
unsigned long state[5]
Definition: Sha1.h:17
unsigned long total[2]
Definition: Sha1.h:16
void sha1_forRMS_update ( sha1_forRMS_context ctx,
unsigned char *  input,
int  ilen 
)

SHA-1 process buffer.

Parameters
ctxSHA-1 context
inputbuffer holding the data
ilenlength of the input data

Definition at line 232 of file Sha1.cpp.

References sha1_forRMS_context::buffer, stan::math::fill(), art::left(), sha1_forRMS_process(), and sha1_forRMS_context::total.

Referenced by sha1_forRMS_csum(), sha1_forRMS_file(), sha1_forRMS_finish(), sha1_forRMS_hmac(), and gov::fnal::cd::rms::util::UUIDGenerator::UUIDGenerator().

234 {
235  int fill;
236  unsigned long left;
237 
238  if( ilen <= 0 )
239  return;
240 
241  left = ctx->total[0] & 0x3F;
242  fill = 64 - left;
243 
244  ctx->total[0] += ilen;
245  ctx->total[0] &= 0xFFFFFFFF;
246 
247  if( ctx->total[0] < (unsigned long) ilen )
248  ctx->total[1]++;
249 
250  if( left && ilen >= fill )
251  {
252  memcpy( (void *) (ctx->buffer + left),
253  (void *) input, fill );
254  sha1_forRMS_process( ctx, ctx->buffer );
255  input += fill;
256  ilen -= fill;
257  left = 0;
258  }
259 
260  while( ilen >= 64 )
261  {
262  sha1_forRMS_process( ctx, input );
263  input += 64;
264  ilen -= 64;
265  }
266 
267  if( ilen > 0 )
268  {
269  memcpy( (void *) (ctx->buffer + left),
270  (void *) input, ilen );
271  }
272 }
unsigned long total[2]
Definition: Sha1.h:16
static void sha1_forRMS_process(sha1_forRMS_context *ctx, unsigned char data[64])
Definition: Sha1.cpp:72
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104
void fill(std::vector< T > &x, const S &y)
Definition: fill.hpp:22
unsigned char buffer[64]
Definition: Sha1.h:18

Variable Documentation

const unsigned char sha1_forRMS_padding[64]
static
Initial value:
=
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 274 of file Sha1.cpp.

Referenced by sha1_forRMS_finish().