pub(crate) fn rekey(
    entries: &[RagenixRule],
    identities: &[String],
    mut writer: impl Write,
) -> Result<()> {
    let identities = age::get_identities(identities)?;
    for entry in entries {
        if entry.path.exists() {
            writeln!(writer, "Rekeying {}", entry.path.display())?;
            age::rekey(&entry.path, &identities, &entry.public_keys)?;
        } else {
            writeln!(writer, "Does not exist, ignored: {}", entry.path.display())?;
        }
    }
    Ok(())
}
/// Rekey all entries with the specified public keys
Rekey all entries with the specified public keys
Rekey all entries with the specified public keys
pub(crate) fn rekey(
    entries: &[RagenixRule],
    identities: &[String],
    mut writer: impl Write,
) -> Result<()> {
    let identities = age::get_identities(identities)?;
    for entry in entries {
        if entry.path.exists() {
            writeln!(writer, "Rekeying {}", entry.path.display())?;
            age::rekey(&entry.path, &identities, &entry.public_keys)?;
        } else {
            writeln!(writer, "Does not exist, ignored: {}", entry.path.display())?;
        }
    }
    Ok(())
}
pub ( crate ) fn rekey ( entries : & [ RagenixRule ] , identities : & [ String ] , mut writer : impl Write , ) -> Result < ( ) > { let identities = age :: get_identities ( identities ) ? ; for entry in entries { if entry . path . exists ( ) { writeln ! ( writer " " entry path display ( ) ) ? ; age :: rekey ( & entry . path , & identities , & entry . public_keys ) ? ; } else { writeln ! ( writer " " entry path display ( ) ) ? ; } } Ok ( ( ) ) }
Rekey all entries with the specified public keys
Rekey all entries with the specified public keys
entries
&[RagenixRule]
identities
&[String]
writer
impl Write