code: def encrypt(self, plain, algorithm='md5'):
          
          plain = helper.to_bytes(plain)
          return getattr(hashlib, algorithm)(plain).hexdigest()
docs: 简单封装系统加密
  
          :param plain: 待加密内容
          :type plain:  ``str/bytes``
          :param algorithm: 加密算法
          :type algorithm: str
          :return:
          :rtype: