public static KeySecurity GetKeySecurity(KeyType KeyType) {
switch (KeyType) {
case KeyType.DSK:
case KeyType.DEK:
case KeyType.DAK: {
return KeySecurity.Device;
}
case KeyType.ASK:
case KeyType.AEK:
case KeyType.AAK:
{
return KeySecurity.Exportable;
}
case KeyType.PMSK:
case KeyType.POSK:
case KeyType.PMEK: {
return KeySecurity.Master;
}
}
return KeySecurity.Ephemeral;
}