MCPcopy Create free account
hub / github.com/mpdavis/python-jose / encrypt

Method encrypt

jose/backends/base.py:27–38  ·  view source on GitHub ↗

Encrypt the plain text and generate an auth tag if appropriate Args: plain_text (bytes): Data to encrypt aad (bytes, optional): Authenticated Additional Data if key's algorithm supports auth mode Returns: (bytes, bytes, bytes): IV, ciphe

(self, plain_text, aad=None)

Source from the content-addressed store, hash-verified

25 raise NotImplementedError()
26
27 def encrypt(self, plain_text, aad=None):
28 """
29 Encrypt the plain text and generate an auth tag if appropriate
30
31 Args:
32 plain_text (bytes): Data to encrypt
33 aad (bytes, optional): Authenticated Additional Data if key's algorithm supports auth mode
34
35 Returns:
36 (bytes, bytes, bytes): IV, cipher text, and auth tag
37 """
38 raise NotImplementedError()
39
40 def decrypt(self, cipher_text, iv=None, aad=None, tag=None):
41 """

Calls

no outgoing calls