pgp_sym_encrypt uses a random salt each time, so you cannot compare the output to p1 like you would do with crypt to verify a given plaintext. Instead, usepgp_sym_decrypt with p1 as input to get the plaintext. -- Erik
Ah! That makes sense. Thanks Erik!