Function deltachat::key::store_self_keypair

source ·
pub(crate) async fn store_self_keypair(
    context: &Context,
    keypair: &KeyPair,
    default: KeyPairUse,
) -> Result<()>
Expand description

Store the keypair as an owned keypair for addr in the database.

This will save the keypair as keys for the given address. The “self” here refers to the fact that this DC instance owns the keypair. Usually addr will be Config::ConfiguredAddr.

If either the public or private keys are already present in the database, this entry will be removed first regardless of the address associated with it. Practically this means saving the same key again overwrites it.