[Python] DES 예제
import requests, urllib, json import base64 import pyDes class DES: def __init__(self, iv, key): self.iv = iv self.key = key def encrypt(self, data): k = pyDes.des(self.key, pyDes.ECB, self.iv, pad=None, padmode=pyDes.PAD_PKCS5) d = k.encrypt(data) d = base64.encodestring(d) return d def decrypt(self, data): k = pyDes.des(self.key, pyDes.ECB, self.iv, pad=None, padmode=pyDes.PAD_PKCS5) d = k.dec..
2018. 2. 6.