[#BloombergLP-balber-BerUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil :relfileprefix: ../../ :mrdocs: Utility for encoding and decoding primitive BER constructs and values. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BerUtil; ---- == Description This utility contains functions to encode and decode primitive BER constructs and simple value semantic types. By convention, all functions return 0 on success, and a non‐zero value otherwise. Also by convention, all the "get" functions take an `accumNumBytesConsumed`; each of the functions will add to this variable the number of bytes consumed within the scope of the function. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil/_04enum.adoc[`Unnamed enum`] | Constants used as BER length sentinels. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil/getEndOfContentOctets.adoc[`getEndOfContentOctets`] | Decode BER end‐of‐content octets from `streamBuf`. | xref:BloombergLP/balber/BerUtil/getIdentifierOctets.adoc[`getIdentifierOctets`] | Decode BER identifier octets from `streamBuf`. | xref:BloombergLP/balber/BerUtil/getLength.adoc[`getLength`] | Decode BER length octets from `streamBuf`. | xref:BloombergLP/balber/BerUtil/getValue-0b.adoc[`getValue`] | `getValue` overloads | xref:BloombergLP/balber/BerUtil/putEndOfContentOctets.adoc[`putEndOfContentOctets`] | Encode the "end‐of‐content" octets (two consecutive zero‐octets) to the specified `streamBuf`. | xref:BloombergLP/balber/BerUtil/putIdentifierOctets.adoc[`putIdentifierOctets`] | Encode the identifier octets for the specified `tagClass`, `tagType` and `tagNumber` to the specified `streamBuf`. | xref:BloombergLP/balber/BerUtil/putIndefiniteLengthOctet.adoc[`putIndefiniteLengthOctet`] | Encode the BER indefinite‐length octet to `streamBuf`. | xref:BloombergLP/balber/BerUtil/putLength.adoc[`putLength`] | Encode the specified `length` to the specified `streamBuf`. | xref:BloombergLP/balber/BerUtil/putValue.adoc[`putValue`] | Encode the specified `value` to the specified `streamBuf`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#