SImpleSubCipher.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Cipherinpython 作者: EvanMu96 项目源码 文件源码
def main():
    my_message = 'If a man is offered a fact which goes against his instincts, he will scrutinize it closely, and unless the evidence is overwhelming, he will refuse to believe it. If, on the other hand, he is offered something which affords a reason for acting in accordance to his instincts, he will accept it even on the slightest evidence. The origin of myths is explained in this way. -Bertrand Russell'
    my_key = 'LFWOAYUISVKMNXPBDCRJTQEGHZ'
    my_mode = 'encrypt'

    # Check my_key is valid or not
    check_valid_key(my_key)

    if my_mode=='encrypt':
        translated = encrypt_message(my_key, my_message)
    elif my_mode=='decrypt':
        translated = decrypt_message(my_key, my_message)
    print('Using key %s' % my_key)
    print('THe %sed message is :' % my_mode)
    print(translated)
    pyperclip.copy(translated)
    print()
    print('This message has copied to clipboard')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号