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")
def test_hex(): assert hex("hello") == "68656c6c6f" assert unhex("68656c6c6f") == "hello"