-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tlv] Implemented Getter for Localized String Identifier (#24528)
* [tlv] Implemented Getter for Localized String Identifier New method TLVReader::Get(Optional<LocalizedStringIdentifier>&) returns Localized String Identifier if present. The method takes what's after the first Information Separator 1 <IS1>, and until end of string or second <IS1>, and return the hex-decoded string identifier, if one was there. * Added two error test cases: - buffer underrun error: happens when encoded tlv data buffer length is shorter than needed. - wrong tlv type error, happens when bytestring is encoded while utf-8 string was expected. * Update src/lib/core/TLVReader.h Co-authored-by: Karsten Sperling <[email protected]> * Update src/lib/core/TLVReader.cpp Co-authored-by: Karsten Sperling <[email protected]> * Update src/lib/core/TLVReader.cpp Co-authored-by: Karsten Sperling <[email protected]> * Added check for leading zeroes in the Localized String Identifier. Co-authored-by: Karsten Sperling <[email protected]>
- Loading branch information
Showing
4 changed files
with
185 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters