fn classify_pin_envelope(
envelope_key_id: Option<&KeyId>,
current_user_key_id: &KeyId,
user_key_is_v1: bool,
) -> PinEnvelopeActionExpand description
Decides what to do with the persistent PIN envelope.
- No key id at all means the envelope predates derived key ids, which means it was sealed under a V1 key — V2 keys have always had one.
- A key id that differs from the user key’s is ambiguous, and only the V2 upgrade token can resolve it.