def test_parse_header_twofish_cipher(): h = helpers.create_header() h.flags = 0x8 h2 = Header(h.to_bytearray()) assert h2.cipher == Header.TWOFISH_CIPHER
def test_parse_header_unknown_cipher(): h = helpers.create_header() h.flags = 0x4 Header(h.to_bytearray())
def test_parse_header_invalid_version(): h = helpers.create_header() h.version = 0x00020002 Header(h.to_bytearray())
def test_parse_header_invalid_signature1(): h = helpers.create_header() h.signature1 = 0xDEADBEEF Header(h.to_bytearray())
def test_parse_header_len_too_small(): h = helpers.create_header() Header(h.to_bytearray()[:100])
def test_header(): h = helpers.create_header() h2 = Header(h.to_bytearray()) helpers.equal_headers(h, h2)