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

Function SetLength

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

Source from the content-addressed store, hash-verified

173
174
175word32 SetLength(word32 length, byte* output)
176{
177 word32 i = 0;
178
179 if (length < LONG_LENGTH)
180 output[i++] = length;
181 else {
182 output[i++] = BytePrecision(length) | 0x80;
183
184 for (int j = BytePrecision(length); j; --j) {
185 output[i] = length >> (j - 1) * 8;
186 i++;
187 }
188 }
189 return i;
190}
191
192
193PublicKey::PublicKey(const byte* k, word32 s) : key_(0), sz_(0)

Callers 3

SetAlgoIDMethod · 0.85
SetSequenceFunction · 0.85
EncodeDSA_SignatureFunction · 0.85

Calls 1

BytePrecisionFunction · 0.85

Tested by

no test coverage detected