You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\utils\decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\contrib\auth\mixins.py", line 52, in dispatch
return super().dispatch(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 158, in get
context = self.get_context_data(**kwargs)
File "C:\Users\yashk\Dev\ecom\paytm\views.py", line 53, in get_context_data
'CHECKSUMHASH': generate_checksum(ctx['paytm_req_data'], settings.PAYTM_MERCHANT_KEY)
File "C:\Users\yashk\Dev\ecom\paytm\utils.py", line 23, in generate_checksum
return encode(hash_string, IV, merchant_key)
File "C:\Users\yashk\Dev\ecom\paytm\utils.py", line 108, in encode
c = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8'))
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher\AES.py", line 232, in new
return create_cipher(sys.modules[name], key, mode, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher_init.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher
raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (12 bytes)
The text was updated successfully, but these errors were encountered:
Cannot fix this ValueError in utils.py
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\utils\decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\contrib\auth\mixins.py", line 52, in dispatch
return super().dispatch(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 97, in dispatch
return handler(request, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\django\views\generic\base.py", line 158, in get
context = self.get_context_data(**kwargs)
File "C:\Users\yashk\Dev\ecom\paytm\views.py", line 53, in get_context_data
'CHECKSUMHASH': generate_checksum(ctx['paytm_req_data'], settings.PAYTM_MERCHANT_KEY)
File "C:\Users\yashk\Dev\ecom\paytm\utils.py", line 23, in generate_checksum
return encode(hash_string, IV, merchant_key)
File "C:\Users\yashk\Dev\ecom\paytm\utils.py", line 108, in encode
c = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8'))
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher\AES.py", line 232, in new
return create_cipher(sys.modules[name], key, mode, *args, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher_init.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "C:\Users\yashk\Dev\ecom\env\lib\site-packages\Crypto\Cipher\AES.py", line 93, in _create_base_cipher
raise ValueError("Incorrect AES key length (%d bytes)" % len(key))
ValueError: Incorrect AES key length (12 bytes)
The text was updated successfully, but these errors were encountered: