打开题目 提示很明显,也没有隐瞒
难点是写python,网上题解
----------------------------------------------------------
# coding:utf8
import base64
def repeatedb64decode(ciphertext, times): ''' 功能 : 指定次数解密Base64 参数 : ciphertext : 密文 times : 次数 返回 : 返回将密文解密times次得到的明文 备注 : 当用户输入次数大于密文加密次数时候 , 只会解密到最终的明文 , 而不会一直进行解密 ''' for i in range(times): try: ciphertext = base64.b64decode(ciphertext) except Exception: return ciphertext return ciphertext def recursive64decode(ciphertext): ''' 功能 : 递归解密Base64 参数 : ciphertext : 密文 返回 : 返回彻底解密得到的明文 ''' while True: try: ciphertext = base64.b64decode(ciphertext) except Exception: return ciphertext def repeatedb64encode(plaintext , times): ''' 功能 : 指定次数加密Base64 参数 : plaintext : 明文 times : 密文 返回 : 将plaintext加密times次得到的密文 备注 : 加密不存在异常抛出的问题 ''' for i in range(times): plaintext = base64.b64encode(plaintext) return plaintext ciphertext = "" print recursive64decode(ciphertext)
----------------------------------------------
参考 https://www.jianshu.com/p/7e3ce1338b2c