예제 #1
0
파일: test_crypto.py 프로젝트: nbdy/roach
def test_rc4():
    assert rc4.encrypt("Key", "Plaintext") == unhex("bbf316e8d940af0ad3")
    assert rc4.decrypt("Wiki", "pedia") == unhex("1021bf0420")
    assert rc4.decrypt("Secret", "Attack at dawn") == (
        unhex("45a01f645fc35b383552544b9bf5")
    )
    assert rc4("hello", "world") == unhex("783ecd96cf")
예제 #2
0
파일: test_string.py 프로젝트: nbdy/roach
def test_hex():
    assert hex("hello") == "68656c6c6f"
    assert unhex("68656c6c6f") == "hello"