pub fn looks_encrypted(data: &[u8]) -> boolExpand description
Detect whether raw file bytes look like an AES-256-GCM encrypted secrets blob (binary with salt+nonce header) or a plaintext secrets file (UTF-8 JSON / YAML / TOML).
Returns true if the content appears to be encrypted.
Heuristic:
- Files shorter than the minimum encrypted length cannot be valid ciphertext.
- If the content is valid UTF-8, starts with a JSON/YAML/TOML
marker, and successfully parses as
Vec<SecretEntry>, it is considered plaintext. - Otherwise it is assumed to be encrypted.