AES算法中xtime的理解

  用python寫了個函數來加深一下理解,代碼以下:python #!/usr/bin/env python3 #coding:utf-8 def xtime(hexstr): num = int(hexstr,16) bs1 = bin(num)[2:] if len(bs1)!=8: bs1 = '0'*(8-len(bs1))+bs1 num = (num<<1)%2**8
相關文章
相關標籤/搜索