moved generic functions to CryptoTools.java; added week2 tasks