added flag to crypto constructor to allow for key generation on object creation
removed setEncryptionType() function
restructured unit tests and added client tests