forked from nanoframework/nanoFramework.IoT.Device
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AccessSector.cs
69 lines (57 loc) · 1.67 KB
/
AccessSector.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Iot.Device.Card.Mifare
{
/// <summary>
/// All access sectors rights for the keys and the access bits
/// </summary>
[Flags]
public enum AccessSector
{
/// <summary>
/// No access
/// </summary>
None = 0b0000_0000,
/// <summary>
/// Write Key A With Key A
/// </summary>
WriteKeyAWithKeyA = 0b0000_0001,
/// <summary>
/// Write Key A With Key B
/// </summary>
WriteKeyAWithKeyB = 0b0000_0010,
/// <summary>
/// Read Access Bits With Key A
/// </summary>
ReadAccessBitsWithKeyA = 0b0000_0100,
/// <summary>
/// Read Access Bits With Key B
/// </summary>
ReadAccessBitsWithKeyB = 0b0000_1000,
/// <summary>
/// Write Key B With Key A
/// </summary>
WriteKeyBWithKeyA = 0b0001_0000,
/// <summary>
/// Write Key B With Key B
/// </summary>
WriteKeyBWithKeyB = 0b0010_0000,
/// <summary>
/// Write Access Bits With Key A
/// </summary>
WriteAccessBitsWithKeyA = 0b0100_0000,
/// <summary>
/// Write Access Bits With Key B
/// </summary>
WriteAccessBitsWithKeyB = 0b1000_0000,
/// <summary>
/// Sometimes the KeyB may be read
/// </summary>
ReadKeyB = 0b0001_0000_0000,
/// <summary>
/// Read Key B With Key A
/// </summary>
ReadKeyBWithKeyA = 0b0010_0000_0000,
}
}