示例#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
示例#2
0
def test_parse_header_unknown_cipher():
    h = helpers.create_header()
    h.flags = 0x4
    Header(h.to_bytearray())
示例#3
0
def test_parse_header_invalid_version():
    h = helpers.create_header()
    h.version = 0x00020002
    Header(h.to_bytearray())
示例#4
0
def test_parse_header_invalid_signature1():
    h = helpers.create_header()
    h.signature1 = 0xDEADBEEF
    Header(h.to_bytearray())
示例#5
0
def test_parse_header_len_too_small():
    h = helpers.create_header()
    Header(h.to_bytearray()[:100])
示例#6
0
def test_header():
    h = helpers.create_header()
    h2 = Header(h.to_bytearray())

    helpers.equal_headers(h, h2)