MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / GetCompareHash

Method GetCompareHash

extra/yassl/taocrypt/src/asn.cpp:926–944  ·  view source on GitHub ↗

extract compare signature hash from plain and place into digest

Source from the content-addressed store, hash-verified

924
925// extract compare signature hash from plain and place into digest
926void CertDecoder::GetCompareHash(const byte* plain, word32 sz, byte* digest,
927 word32 digSz)
928{
929 if (source_.GetError().What()) return;
930
931 Source s(plain, sz);
932 CertDecoder dec(s, false);
933
934 dec.GetSequence();
935 dec.GetAlgoId();
936 dec.GetDigest();
937
938 if (dec.sigLength_ > digSz) {
939 source_.SetError(SIG_LEN_E);
940 return;
941 }
942
943 memcpy(digest, dec.signature_, dec.sigLength_);
944}
945
946
947// validate signature signed by someone else

Callers

nothing calls this directly

Calls 6

GetSequenceMethod · 0.80
GetAlgoIdMethod · 0.80
GetDigestMethod · 0.80
WhatMethod · 0.45
GetErrorMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected