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

Method GetDigest

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

read cert digest, store in signature_

Source from the content-addressed store, hash-verified

707
708// read cert digest, store in signature_
709word32 CertDecoder::GetDigest()
710{
711 if (source_.GetError().What()) return 0;
712 byte b = source_.next();
713
714 if (b != OCTET_STRING) {
715 source_.SetError(OCTET_STR_E);
716 return 0;
717 }
718
719 sigLength_ = GetLength(source_);
720
721 signature_ = NEW_TC byte[sigLength_];
722 memcpy(signature_, source_.get_current(), sigLength_);
723 source_.advance(sigLength_);
724
725 return sigLength_;
726}
727
728
729// memory length checked add tag to buffer

Callers 1

GetCompareHashMethod · 0.80

Calls 7

GetLengthFunction · 0.85
advanceMethod · 0.80
WhatMethod · 0.45
GetErrorMethod · 0.45
nextMethod · 0.45
SetErrorMethod · 0.45
get_currentMethod · 0.45

Tested by

no test coverage detected