MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / DEREncode

Method DEREncode

src/cryptlib/integer.cpp:1415–1425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1413}
1414
1415unsigned int Integer::DEREncode(byte *output) const
1416{
1417 unsigned int i=0;
1418 output[i++] = INTEGER;
1419 unsigned int bc = MinEncodedSize(SIGNED);
1420 SecByteBlock buf(bc);
1421 Encode(buf, bc, SIGNED);
1422 i += DERLengthEncode(bc, output+i);
1423 memcpy(output+i, buf, bc);
1424 return i+bc;
1425}
1426
1427unsigned int Integer::DEREncode(BufferedTransformation &bt) const
1428{

Callers 1

SaveMethod · 0.45

Calls 2

DERLengthEncodeFunction · 0.85
PutMethod · 0.45

Tested by

no test coverage detected