fix bug
move the encryption to the outside of the pcs api