How to use the azure-storage-queue.azure.storage.queue._encryption._encrypt_queue_message function in azure-storage-queue

To help you get started, we’ve selected a few azure-storage-queue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-storage-python / azure-storage-queue / azure / storage / queue / _serialization.py View on Github external
def _convert_queue_message_xml(message_text, encode_function, key_encryption_key):
    '''
    
    
        
    
    '''
    queue_message_element = ETree.Element('QueueMessage')

    # Enabled
    message_text = encode_function(message_text)
    if key_encryption_key is not None:
        message_text = _encrypt_queue_message(message_text, key_encryption_key)
    ETree.SubElement(queue_message_element, 'MessageText').text = message_text

    # Add xml declaration and serialize
    try:
        stream = BytesIO()
        ETree.ElementTree(queue_message_element).write(stream, xml_declaration=True, encoding='utf-8', method='xml')
        output = stream.getvalue()
    finally:
        stream.close()

    return output

azure-storage-queue

Microsoft Azure Azure Queue Storage Client Library for Python

MIT
Latest version published 2 months ago

Package Health Score

96 / 100
Full package analysis

Popular azure-storage-queue functions