Skip to main content

Module sync

Module sync 

Source
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_remote_code
Generate a random remote-watch code like RM-a3f2b1c4d5e6f7a8b9.
generate_share_code
Generate a random share code like SC-a3f2b1c4d5e6f7a8b9.
pull_share
Pull {base_url, api_key} from the relay for code. Deletes the entry on success.
push_share
Push {base_url, api_key} to the relay under code. TTL 10 minutes, one-time read.
validate_remote_code
Validate that a remote-watch code looks like what we generated.
validate_share_code
Validate that a share code has the expected format.