Exposing primary keys is bad practice. How should I expose UUID or BIGSERIAL Primary Keys to clients — hashing, encoding, encrypting? For integers there are libraries like hashids, what about UUID?
UUIDs are just large integers written in a particular format. There are libraries that convert to and fro UUIDs, or you can check out answers such as this.
Once you have the integer, you can employ AES, or some reversible scheme such as a Feistel network or, if the user has no way of ever recovering the decrypted information, a simple XOR with a known secret.