@@ -636,7 +636,6 @@ def encrypt(
636
636
algorithm : str ,
637
637
key_id : Optional [Binary ] = None ,
638
638
key_alt_name : Optional [str ] = None ,
639
- index_key_id : Optional [Binary ] = None ,
640
639
query_type : Optional [str ] = None ,
641
640
contention_factor : Optional [int ] = None ,
642
641
) -> Binary :
@@ -653,34 +652,29 @@ def encrypt(
653
652
:class:`~bson.binary.Binary` with subtype 4 (
654
653
:attr:`~bson.binary.UUID_SUBTYPE`).
655
654
- `key_alt_name`: Identifies a key vault document by 'keyAltName'.
656
- - `index_key_id`: **(BETA)** The index key id to use for Queryable Encryption. Must be
657
- a :class:`~bson.binary.Binary` with subtype 4 (:attr:`~bson.binary.UUID_SUBTYPE`).
658
655
- `query_type` (str): **(BETA)** The query type to execute. See
659
656
:class:`QueryType` for valid options.
660
657
- `contention_factor` (int): **(BETA)** The contention factor to use
661
658
when the algorithm is :attr:`Algorithm.INDEXED`. An integer value
662
659
*must* be given when the :attr:`Algorithm.INDEXED` algorithm is
663
660
used.
664
661
665
- .. note:: `index_key_id`, ` query_type`, and `contention_factor` are part of the
662
+ .. note:: `query_type` and `contention_factor` are part of the
666
663
Queryable Encryption beta. Backwards-breaking changes may be made before the
667
664
final release.
668
665
669
666
:Returns:
670
667
The encrypted value, a :class:`~bson.binary.Binary` with subtype 6.
671
668
672
669
.. versionchanged:: 4.2
673
- Added the `index_key_id`, `query_type`, and `contention_factor` parameters.
670
+ Added the `query_type` and `contention_factor` parameters.
671
+
674
672
"""
675
673
self ._check_closed ()
676
674
if key_id is not None and not (
677
675
isinstance (key_id , Binary ) and key_id .subtype == UUID_SUBTYPE
678
676
):
679
677
raise TypeError ("key_id must be a bson.binary.Binary with subtype 4" )
680
- if index_key_id is not None and not (
681
- isinstance (index_key_id , Binary ) and index_key_id .subtype == UUID_SUBTYPE
682
- ):
683
- raise TypeError ("index_key_id must be a bson.binary.Binary with subtype 4" )
684
678
685
679
doc = encode ({"v" : value }, codec_options = self ._codec_options )
686
680
with _wrap_encryption_errors ():
@@ -689,7 +683,6 @@ def encrypt(
689
683
algorithm ,
690
684
key_id = key_id ,
691
685
key_alt_name = key_alt_name ,
692
- index_key_id = index_key_id ,
693
686
query_type = query_type ,
694
687
contention_factor = contention_factor ,
695
688
)
0 commit comments