This commit is contained in:
TheJoKlLa
2020-10-05 18:39:45 +02:00
parent 6a5f521800
commit d601e9afb3
24 changed files with 319 additions and 213 deletions

View File

@ -0,0 +1,8 @@
namespace NFC.Mifare_DESFire.Enums
{
public enum AccessRights : byte
{
FREE = 0x0E,
NEVER = 0x0F
}
}

View File

@ -0,0 +1,21 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// hold the Access Rights for changing application keys (Change Key command)
/// </summary>
public enum ChangeApplicationKey : byte
{
/// <summary>
/// Application master key authentication is necessary to change any key (default)
/// </summary>
MASTERKEY = 0x00,
/// <summary>
/// Authentication with the key to be changed (same Key#) is necessary to change a key
/// </summary>
SAMEKEY = 0x0E,
/// <summary>
/// All keys (except application master key, see Bit 0) within this application are frozen
/// </summary>
ALLKEYS = 0x0F
}
}

View File

@ -0,0 +1,18 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// codes whether the application master key is changeable
/// </summary>
public enum ChangeMasterKey : byte
{
/// <summary>
/// Application master key is not changeable anymore (frozen)
/// </summary>
FROZEN = 0x00,
/// <summary>
/// Application master key is changeable (authentication with the current application master key necessary, default)
/// </summary>
CHANGEABLE = 0x01,
}
}

View File

@ -0,0 +1,19 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// codes whether a change of the application master key settings is allowed
/// </summary>
public enum ChangeMasterKeySettings : byte
{
/// <summary>
/// configuration not changeable anymore (frozen)
/// </summary>
FROZEN = 0x00,
/// <summary>
/// this configuration is changeable if authenticated with the application master key (default)
/// </summary>
WITHMASTERKEY = 0x08
}
}

View File

@ -0,0 +1,18 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// codes whether application master key authentication is needed before “Create File” / “Delete File”
/// </summary>
public enum CreateDeleteFile : byte
{
/// <summary>
/// “Create File”/ “Delete File”is permitted only with application master key authentication
/// </summary>
ONLYMASTERKEY = 0x00,
/// <summary>
/// “Create File”/ “Delete File”is permitted also without application master key authentication (default)
/// </summary>
NOKEY = 0x04,
}
}

View File

@ -0,0 +1,12 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// Crypto method of the application
/// </summary>
public enum CryptoOperationsType : byte
{
TDES = 0x00,
TKTDES = 0x40,
AES = 0x80,
}
}

View File

@ -0,0 +1,20 @@
namespace NFC.Mifare_DESFire.Enums
{
public enum FileCommunication : byte
{
/// <summary>
/// "Plain communication"
/// </summary>
PLAIN = 0x00,
/// <summary>
/// Plain communication secured by DES/3DES MACing
/// </summary>
MAC = 0x01,
/// <summary>
/// Fully DES/3DES enciphered communication
/// </summary>
ENCRYPT = 0x03
}
}

View File

@ -0,0 +1,18 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// codes whether application master key authentication is needed for file directory access
/// </summary>
public enum FileDirectoryAccess : byte
{
/// <summary>
/// Successful application master key authentication is required for executing the “Get FID List”, “Get File Settings”and “Get Key Settings”commands
/// </summary>
ONLYMASTERKEY = 0x00,
/// <summary>
/// “Get FID List”, “Get File Settings” and “Get Key Settings” commands succeed independentlyof a preceding application master key authentication (default)
/// </summary>
NOKEY = 0x02,
}
}

View File

@ -0,0 +1,11 @@
namespace NFC.Mifare_DESFire.Enums
{
/// <summary>
/// Indicates use of 2 byte ISO/IEC 7816-4 File Identifies for files within the Application
/// </summary>
public enum FileIdentifies : byte
{
NOTUSED = 0x00,
USED = 0x20
}
}