Reformatted call to security's encrypt function