Module header

Description

No description yet.

Functions

deconstructRetrieve the header from the infile stream, and decrypts it
decryptPartition the packets into those that we can be decrypt and the others
decrypt_packetDecrypt the packet, scanning all the keys keys is iterated and each item must be of the form (method, ...)
decrypt_X25519_Chacha20_Poly1305
encryptComputes the encrypted part, using all keys keys is iterated and each item must be of the form (method, ...)
encrypt_X25519_Chacha20_Poly1305Computes the encrypted part
make_packet_data_edit_list
make_packet_data_enc
parseParses a given stream, verifies it and returns header's encrypted part
parse_edit_list_packetReturns a generator to produce the lengths numbers from the packet bytes
parse_enc_packet
partition_packets
rearrangeRe-arrange the edit list in accordance to the [start;end] range
reencryptRe-encrypt the given header
serializeSerializes header packets to a byte stream
validate_edit_listSome (obvious) validation

Variables

Variables (header.py)

LOG = logging.getLogger(__name__)

string MAGIC_NUMBER = b'crypt4gh'

string PACKET_TYPE_DATA_ENC = b'\x00\x00\x00\x00'

string PACKET_TYPE_EDIT_LIST = b'\x01\x00\x00\x00'

Source

Line 1 in crypt4gh/header.py.






Add Discussion as Guest

Log in