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

Function GetLength

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

used by Integer as well

Source from the content-addressed store, hash-verified

149
150// used by Integer as well
151word32 GetLength(Source& source)
152{
153 word32 length = 0;
154
155 byte b = source.next();
156 if (b >= LONG_LENGTH) {
157 word32 bytes = b & 0x7F;
158
159 if (source.IsLeft(bytes) == false) return 0;
160
161 while (bytes--) {
162 b = source.next();
163 length = (length << 8) | b;
164 }
165 }
166 else
167 length = b;
168
169 if (source.IsLeft(length) == false) return 0;
170
171 return length;
172}
173
174
175word32 SetLength(word32 length, byte* output)

Callers 11

AS2Function · 0.85
GetSequenceMethod · 0.85
GetSetMethod · 0.85
ReadHeaderOpenSSLMethod · 0.85
AddDSAMethod · 0.85
GetAlgoIdMethod · 0.85
GetSignatureMethod · 0.85
GetDigestMethod · 0.85
GetNameMethod · 0.85
GetDateMethod · 0.85
DecodeDSA_SignatureFunction · 0.85

Calls 2

IsLeftMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected