the universal sandbox runtime for agents and humans.
pocketenv.io
sandbox
openclaw
agent
claude-code
vercel-sandbox
deno-sandbox
cloudflare-sandbox
atproto
sprites
daytona
1import sodium from "libsodium-wrappers";
2import { env } from "./env";
3
4await sodium.ready;
5
6export default function decrypt(value: string): string {
7 const sealed = sodium.from_base64(
8 value,
9 sodium.base64_variants.URLSAFE_NO_PADDING,
10 );
11 const decryptedBytes = sodium.crypto_box_seal_open(
12 sealed,
13 sodium.from_hex(env.PUBLIC_KEY),
14 sodium.from_hex(env.PRIVATE_KEY),
15 );
16 return sodium.to_string(decryptedBytes);
17}