#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] |
Referenced by stan::math::matrix_exp_action_handler::action(), stan::math::beta_binomial_cdf(), stan::math::beta_binomial_lccdf(), stan::math::beta_binomial_lcdf(), genie::SmithMonizUtils::DMINFC(), stan::math::gaussian_dlm_obs_log(), stan::math::gaussian_dlm_obs_lpdf(), stan::math::internal::get_num_threads(), main(), stan::math::internal::map_rect_reduce< F, var, var >::operator()(), stan::math::internal::map_rect_reduce< F, double, double >::operator()(), stan::math::internal::map_rect_reduce< F, double, var >::operator()(), stan::math::internal::map_rect_reduce< F, var, double >::operator()(), rsim::FPGA_MatchedFiltering::PerfectASICCurve(), and stan::math::promote_common().
#define K 0x5A827999 |
#define K 0x6ED9EBA1 |
#define K 0x8F1BBCDC |
#define K 0xCA62C1D6 |
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_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::analytic::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 R | ( | t | ) |
Referenced by sha1_forRMS_process().
Referenced by Analyse_Data2DataComp(), Analyse_Data2DataComp_HigherEnergyCuts(), Analyse_Data2DataComp_kNumu2020ND(), red::EnergystimatterConst::EforX(), extract_hadnucleus_xsec(), stan::math::gamma_q(), stan::math::grad_reg_inc_gamma(), hA_basic_analysis(), stan::math::cvodes_integrator< Lmm >::integrate(), stan::math::inv_wishart_log(), stan::math::inv_wishart_lpdf(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), plot_prediction_systs(), Plotting_Data2DataComp(), Plotting_Data2DataComp_SingleCanvas(), genie::FKR::Print(), reduce_the_predfile_nue_numu(), genie::FKR::Reset(), red::EnergystimatterConst::SetS(), TEST(), stan::math::wishart_log(), and stan::math::wishart_lpdf().
Output = SHA-1( input buffer )
input | buffer holding the data |
ilen | length of the input data |
output | SHA-1 checksum result |
Definition at line 338 of file Sha1.cpp.
References sha1_forRMS_finish(), sha1_forRMS_starts(), and sha1_forRMS_update().
int sha1_forRMS_file | ( | char * | path, |
unsigned char | output[20] | ||
) |
Output = SHA-1( file contents )
path | input file name |
output | SHA-1 checksum result |
Definition at line 314 of file Sha1.cpp.
References MakeMiniprodValidationCuts::f, fclose(), getGoodRuns4SAM::n, sha1_forRMS_finish(), sha1_forRMS_starts(), and sha1_forRMS_update().
void sha1_forRMS_finish | ( | sha1_forRMS_context * | ctx, |
unsigned char | output[20] | ||
) |
SHA-1 final digest.
ctx | SHA-1 context |
output | SHA-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().
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 )
key | HMAC secret key |
keylen | length of the HMAC key |
input | buffer holding the data |
ilen | length of the input data |
output | HMAC-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().
|
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().
Checkup routine.
Definition at line 450 of file Sha1.cpp.
Referenced by sha1_forRMS_hmac().
void sha1_forRMS_starts | ( | sha1_forRMS_context * | ctx | ) |
SHA-1 context setup.
ctx | SHA-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().
void sha1_forRMS_update | ( | sha1_forRMS_context * | ctx, |
unsigned char * | input, | ||
int | ilen | ||
) |
SHA-1 process buffer.
ctx | SHA-1 context |
input | buffer holding the data |
ilen | length 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().
|
static |
Definition at line 274 of file Sha1.cpp.
Referenced by sha1_forRMS_finish().