You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RFC 8949 distinctly defines what is "Valid" and what is "Well-formed".
Although the old docs for Valid() correctly said it checks for well-formedness, Valid() is not an appropriate function name because it can lead to confusion.
Proposed Solution
Add Wellformed() as a replacement for Valid().
For now, deprecate Valid() and make it call Wellformed(). This makes Valid() behave the same in v2.5.0 as prior releases.
Wellformed() checks whether data is a well-formed encoded CBOR data item and that it complies with additional restrictions such as MaxNestedLevels, MaxArrayElements, MaxMapPairs, etc. If there are any remaining bytes after the encoded CBOR data item, then ExtraneousDataError is returned.
⚠️ Projects should begin replacing calls to Valid() with calls to WellFormed().
The text was updated successfully, but these errors were encountered:
RFC 8949 distinctly defines what is "Valid" and what is "Well-formed".
Although the old docs for Valid() correctly said it checks for well-formedness, Valid() is not an appropriate function name because it can lead to confusion.
Proposed Solution
Wellformed() checks whether data is a well-formed encoded CBOR data item and that it complies with additional restrictions such as MaxNestedLevels, MaxArrayElements, MaxMapPairs, etc. If there are any remaining bytes after the encoded CBOR data item, then ExtraneousDataError is returned.
The text was updated successfully, but these errors were encountered: