refactored Encryption package