A password can be encrypted using the following syntax:
// Encrypt the passed password
String encrPswd = Pservice.self().encrypt(pswd);
If the passed string is 'null' or 'empty string', then no operation is done and the passed string is returned. If there is any error during encryption then the generated error is thrown to the user.