Skip to content

Instantly share code, notes, and snippets.

@nbah22
nbah22 / laravel_encryption.py
Last active November 3, 2019 02:22
Laravel-compatible encryption and decryption in python
import os
import json
import hashlib
import hmac
import base64
from Crypto.Cipher import AES
from phpserialize import loads, dumps
def mcrypt_decrypt(value, iv):