Make bt const in BERDecodePeekLength

This commit is contained in:
Jeffrey Walton 2019-10-08 07:41:01 -04:00
parent dd1c8a5b24
commit 85ecff4609
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ void DERReencode(BufferedTransformation &source, BufferedTransformation &dest)
encoder.MessageEnd();
}
size_t BERDecodePeekLength(BufferedTransformation &bt)
size_t BERDecodePeekLength(const BufferedTransformation &bt)
{
lword count = (std::min)(bt.MaxRetrievable(), static_cast<lword>(16));
if (count == 0) return 0;

2
asn.h
View File

@ -227,7 +227,7 @@ CRYPTOPP_DLL void CRYPTOPP_API DERReencode(BufferedTransformation &bt, BufferedT
/// consuming octets in the stream. The stream must use definite length encoding.
/// If indefinite length encoding is used or an error occurs, then 0 is returned.
/// \since Crypto++ 8.3
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodePeekLength(BufferedTransformation &bt);
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodePeekLength(const BufferedTransformation &bt);
/// \brief Object Identifier
class CRYPTOPP_DLL OID