Няма описание

b64.py 292B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. import base64
  3. from CodeConvert import CodeConvert as cc
  4. def b64_encrypt(plaintext):
  5. return base64.urlsafe_b64encode(cc.Convert2Utf8(plaintext))
  6. def b64_decrypt(ciphertext):
  7. return cc.Convert2Unicode(base64.urlsafe_b64decode(cc.Convert2Utf8(ciphertext)))