Add password and QR provisioning types

This commit is contained in:
Alex-Emmet 2026-09-28 00:07:42 +02:00
commit b996bb8afb
2 changed files with 44 additions and 0 deletions

15
app_protection.rs Normal file
View file

@ -0,0 +1,15 @@
use mtp::codec::{ApplicationProtectionPurpose, ProtectionPurpose};
pub const REGISTRATION_ACTIVATION: u8 = 0x71;
pub const PASSWORD_MANAGEMENT_SIGNATURE: u8 = 0x72;
pub const PASSWORD_MANAGEMENT_ENCRYPTION: u8 = 0x73;
pub const PASSWORD_RESPONSE_SIGNATURE: u8 = 0x74;
pub const PASSWORD_RESPONSE_ENCRYPTION: u8 = 0x75;
pub const PROVISIONING_CREDENTIAL_SIGNATURE: u8 = 0x76;
pub const PROVISIONING_CREDENTIAL_ENCRYPTION: u8 = 0x77;
pub fn purpose(value: u8) -> ProtectionPurpose {
ApplicationProtectionPurpose::new(value)
.expect("Tensamin application protection purpose must not be MTP-reserved")
.into()
}