updated to use latest version of pemcrypt
flipped arguments, simplified api