![]() |
|
[Help] PyCrypto - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Python (https://sinister.li/Forum-Python) +--- Thread: [Help] PyCrypto (/Thread-Help-PyCrypto) |
[Help] PyCrypto - ProfessorChill - 06-22-2017 So, firstly. This is work related so if you don't want to help because of that, that's alright ![]() Secondly, sorry for not posting that much music. I've been busy, on the plus side I may have a artist that can help me create the frontend for our new radio! Yay (1 year dev and no progress, lol)So now the question: On one of our websites I have a openssl_encrypt done in php, very basic one but whatever: PHP Code: $encrypt_method = "somethingsomethingaes"
$key = hash('sha256', $secret_key);
$iv = substr(hash('sha256', $secret_iv), 0, 16);
$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
$output = base64_encode($output);
My issue is that I'm going to have to due that on Python as well, since I need to parse a CSV with roughly 2,000 items in it, then encrypt it the same way as shown above and upload it to mysql. Any clue how I would do that? (not the mysql part, I already got that down). RE: [Help] PyCrypto - m0dem - 07-09-2017 What do you have so far, @ProfessorChill? |