Ejemplo n.º 1
0
def test_parse_header_twofish_cipher():
    h = helpers.create_header()
    h.flags = 0x8
    h2 = Header(h.to_bytearray())
    assert h2.cipher == Header.TWOFISH_CIPHER
Ejemplo n.º 2
0
def test_parse_header_unknown_cipher():
    h = helpers.create_header()
    h.flags = 0x4
    Header(h.to_bytearray())
Ejemplo n.º 3
0
def test_parse_header_invalid_version():
    h = helpers.create_header()
    h.version = 0x00020002
    Header(h.to_bytearray())
Ejemplo n.º 4
0
def test_parse_header_invalid_signature1():
    h = helpers.create_header()
    h.signature1 = 0xDEADBEEF
    Header(h.to_bytearray())
Ejemplo n.º 5
0
def test_parse_header_len_too_small():
    h = helpers.create_header()
    Header(h.to_bytearray()[:100])
Ejemplo n.º 6
0
def test_header():
    h = helpers.create_header()
    h2 = Header(h.to_bytearray())

    helpers.equal_headers(h, h2)