Encrypted, ephemeral, private memos on atproto
1import { XWing } from "@noble/post-quantum/hybrid.js";
2import type { KeyPair } from "./types.ts";
3
4export function generateKeys(): KeyPair {
5 return XWing.keygen();
6}
7
8export function serializeKey(key: Uint8Array): string {
9 return key.toBase64();
10}
11
12export function deserializeKey(key: string): Uint8Array {
13 return Uint8Array.fromBase64(key);
14}