pub fn encrypt_secrets(pubkey_hex: &str, plaintext: &str) -> Result<String>Expand description
Encrypt plaintext with ChaCha20-Poly1305 using hex-encoded pubkey as symmetric key.
Matches dashboard’s JS implementation exactly:
- Parse hex pubkey → 32-byte key
- Generate 12-byte random nonce
- Encrypt plaintext
- Result: base64([12-byte nonce] + [ciphertext + 16-byte auth tag])