Expand description
Encryption helpers used by the remote command for device-to-device notification relay.
Functions§
- decrypt_
bytes - Decrypt a base64 payload into bytes using the given code.
- encrypt_
bytes - Encrypt arbitrary bytes with the given code; returns a base64 payload string.
- generate_
share_ code - Generate a random share code like
SC-a3f2b1c4d5e6f7a8b9. - pull_
share - Pull {base_url, api_key} from the relay for
code. api_key is decrypted with the code. Deletes the entry on success. - push_
share - Push {base_url, api_key} to the relay under
code. base_url is sent plaintext (not sensitive — it’s just an IP/URL). api_key is encrypted with the share code before sending — the relay never sees it. - validate_
share_ code - Validate that a share code has the expected format.