Skip to main content

wrap_ed25519

Function wrap_ed25519 

Source
pub fn wrap_ed25519(
    private_key_file: impl AsRef<Path>,
    wrapping_key: impl AsRef<Path>,
    object_id: Id,
    domains: Domains,
    capabilities: Capabilities,
    label: Label,
) -> Result<String, Error>
Expand description

Wraps an ed25519 private key file using a wrapping key and returns it in YHW format.

ยงErrors

Returns an error if

  • reading the key file fails
  • reading the wrapping key file fails
  • encryption of the backup fails
  • the inner format structure is incorrect