MCPcopy Create free account
hub / github.com/LUX-Core/lux / BERDecodeOctetString

Function BERDecodeOctetString

src/cryptopp/asn.cpp:117–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117size_t BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str)
118{
119 byte b;
120 if (!bt.Get(b) || b != OCTET_STRING)
121 BERDecodeError();
122
123 size_t bc;
124 if (!BERLengthDecode(bt, bc))
125 BERDecodeError();
126 if (bc > bt.MaxRetrievable()) // Issue 346
127 BERDecodeError();
128
129 str.New(bc);
130 if (bc != bt.Get(str, bc))
131 BERDecodeError();
132 return bc;
133}
134
135size_t BERDecodeOctetString(BufferedTransformation &bt, BufferedTransformation &str)
136{

Callers 3

RunASN1TestSetFunction · 0.85
BERDecodePointMethod · 0.85
BERDecodePointMethod · 0.85

Calls 6

BERDecodeErrorFunction · 0.85
BERLengthDecodeFunction · 0.85
TransferToMethod · 0.80
GetMethod · 0.45
MaxRetrievableMethod · 0.45
NewMethod · 0.45

Tested by

no test coverage detected