class documentation

class EncryptionContext: (source)

Constructor: EncryptionContext(context)

View In Hierarchy

It contains encryption and compression information in it using which application can decrypt consumed message with encrypted-payload.

Method __init__ Create EncryptionContext instance.
Method __repr__ Undocumented
Method __str__ Undocumented
Method algorithm Returns the encryption algorithm.
Method batch_size Returns the number of messages in the batch or -1 if the message is not batched.
Method compression_type Returns the compression type of the message.
Method is_decryption_failed Returns whether decryption has failed for this message.
Method keys Returns all EncryptionKey instances when performing encryption.
Method param Returns the encryption param bytes.
Method uncompressed_message_size Returns the uncompressed message size or 0 if the compression type is NONE.
Instance Variable _context Undocumented
def __init__(self, context: _pulsar.EncryptionContext): (source)

Create EncryptionContext instance.

Parameters
context:_pulsar.EncryptionContextThe underlying EncryptionContext instance from the C extension.
def __repr__(self) -> str: (source)

Undocumented

def __str__(self) -> str: (source)

Undocumented

def algorithm(self) -> str: (source)

Returns the encryption algorithm.

def batch_size(self) -> int: (source)

Returns the number of messages in the batch or -1 if the message is not batched.

def compression_type(self) -> CompressionType: (source)

Returns the compression type of the message.

def is_decryption_failed(self) -> bool: (source)

Returns whether decryption has failed for this message.

def keys(self) -> list[EncryptionKey]: (source)

Returns all EncryptionKey instances when performing encryption.

def param(self) -> bytes: (source)

Returns the encryption param bytes.

def uncompressed_message_size(self) -> int: (source)

Returns the uncompressed message size or 0 if the compression type is NONE.

_context = (source)

Undocumented