示例#1
0
 def get(self, request,  algorithm, text=""):
     hash_obj = GetHash(algorithm)
     return JsonResponse(hash_obj.gethash(text))
示例#2
0
 def post(self, request, algorithm, text=""):
     data = json.loads(request.body)
     text = data.get('text', "")
     hash_obj = GetHash(algorithm)
     return JsonResponse(hash_obj.gethash(text))