PYTHON-3893 Add BSON Binary Data subtype Sensitive (#1335)

This commit is contained in:
Noah Stapp 2023-08-02 13:07:44 -07:00 committed by GitHub
parent dc59eb86c7
commit 240a748fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -183,6 +183,13 @@ COLUMN_SUBTYPE = 7
.. versionadded:: 4.0
"""
SENSITIVE_SUBTYPE = 8
"""BSON binary subtype for sensitive data.
.. versionadded:: 4.5
"""
USER_DEFINED_SUBTYPE = 128
"""BSON binary subtype for any user defined structure.
"""

View File

@ -15,6 +15,7 @@
.. autodata:: CSHARP_LEGACY
.. autodata:: MD5_SUBTYPE
.. autodata:: COLUMN_SUBTYPE
.. autodata:: SENSITIVE_SUBTYPE
.. autodata:: USER_DEFINED_SUBTYPE
.. autoclass:: UuidRepresentation

View File

@ -55,6 +55,11 @@
"canonical_bson": "1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400",
"canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"07\"}}}"
},
{
"description": "subtype 0x08",
"canonical_bson": "1D000000057800100000000873FFD26444B34C6990E8E7D1DFC035D400",
"canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"08\"}}}"
},
{
"description": "subtype 0x80",
"canonical_bson": "0F0000000578000200000080FFFF00",