123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ShengJu_CUT100_DES.MessageEntity.Outgoing
- {
- /// <summary>
- /// 获取卡片内所有应用目录的数量和应用目录 ID
- /// Desfire 卡中的目录 ID 长度为 3 字节,因此每 3 个字节的数据为一个应用目录 ID
- /// </summary>
- public class ReadAppDirsRequest : MessageBase
- {
- public enum ValidationTypeEnum { 不验证主控密钥 = 0, 验证主控密钥 = 1 }
- public ReadAppDirsRequest(byte[] rootKey) : this(ValidationTypeEnum.验证主控密钥, rootKey)
- {
- }
- public ReadAppDirsRequest(ValidationTypeEnum validationType, byte[] rootKey)
- {
- if (rootKey.Length != 16)
- throw new ArgumentException("rootKey must has its length to 16");
- base.命令代码 = CommandType.DesFireEV1操作命令_获取卡片应用目录信息;
- base.RawDataAndCheck = new byte[] { (byte)validationType }.Concat(rootKey).ToList();
- }
- }
- }
|