pub fn load(data_dir: &Path) -> Result<SecretKey>Expand description
Load the node’s SecretKey from disk without generating one when it is
absent — the read-only counterpart of load_or_generate, used by
decdn whoami to report the existing identity without minting a new key.
Applies the same validation as load_or_create’s load path: data_dir
must be a secure directory and node.secret a secure 32-byte regular file.
§Errors
Returns an error if node.secret does not exist; if it is a symlink or
other non-regular file, has the wrong size, or has insecure permissions;
if data_dir is missing, not a directory, or has insecure permissions; if
the key path can’t be stat’d for reasons other than non-existence; or if
reading fails.