These are chat archives for django/django

8th
Feb 2019
Siddharth Jain
@singhaisid0
Feb 08 04:45
@rgegriff I am trying to post pdf file which is encoded by base64.
On localhost:8000/ where I am able to post normal psf but not encoded
Siddharth Jain
@singhaisid0
Feb 08 08:18
Using curl
sahil-developer-88
@sahil-developer-88
Feb 08 09:29
Hi

I am stuck into an issue.

from Crypto.Cipher import AES

obj2 = AES.new('hey my siteuse i', AES.MODE_CBC, 'dsd djxk js jdrd')
dd = b'%\x7fV \xc3`\x8c\xa0\xe4d\x97\xb0k\x1e\xd5\xdb'
original_text = obj2.decrypt(dd)
print(original_text.decode('utf-8'))
if i run the above code, it is giving me correct output, like : F1xmyscr!pt_1234

but if i convert this line dd = b'%\x7fV \xc3\x8c\xa0\xe4d\x97\xb0k\x1e\xd5\xdb' into dd = str(b'%\x7fV \xc3\x8c\xa0\xe4d\x97\xb0k\x1e\xd5\xdb') line, actually i just put str() around that same line, nothing else. It does not give me correct result.
it gives me the following error:
ValueError: Input strings must be a multiple of 16 in length
so, the problem is i am unable to convert str into bytes, can anybody help me to solve this issue?

Aldy syahdeini
@syahdeini
Feb 08 09:41
Hi so I am trying to authenticate user from REMOTE_USER, but I don't want to make model thus save the user info in the backend
so is it possible to do it, without having backend