Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| Notes on linking with C/C++ libraries with gcc/g++ when building an | |
| existing project. | |
| -- Iain Murray, 2015. | |
| There are at least three things that can go wrong when trying to link | |
| with a library that is in a non-standard location on your machine: | |
| 1. The compiler can't find the .h header files. | |
| 2. The linker can't find the library's binary .a or .so files. |
| def sign_data(private_key_loc, data): | |
| ''' | |
| param: private_key_loc Path to your private key | |
| param: package Data 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 base64 import b64encode, b64decode |