Skip to content

Instantly share code, notes, and snippets.

@bhavincb
bhavincb / flutterError.txt
Created May 29, 2018 09:10
flutter stops working because of Adding `&` to path
C:\Users\bj>echo %PATH%
C:\Program Files (x86)\MySQL\MySQL Fabric 1.5
'ABCD123' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\bj>flutter -v
'ABCD123' is not recognized as an internal or external command,
operable program or batch file.
'where' is not recognized as an internal or external command,
operable program or batch file.
@bhavincb
bhavincb / sign.py
Last active May 28, 2018 23:02
python pycrypto pyopenssl sign data from private key
def sign(private_key_loc, policyText):
'''
param: private_key_loc Path to your private key
param: package PolicyText to be signed
return: base64 encoded signature
'''
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA256
from OpenSSL import crypto