1import PGPJS from "@/lib/pgpjs";
2
3
4const keys = await PGPJS.generateKey({
5 name: "Alice",
6 email: "alice@example.com"
7});
8
9
10const ciphertext = await PGPJS.seal({ user: "Bob", balance: 500 }, {
11 to: keys.publicKey
12});
13
14
15const data = await PGPJS.open(ciphertext, {
16 privateKey: keys.privateKey
17});
18
19console.log(data.balance);