Exemplo n.º 1
0
        public static void SelectApplicationProtocol(IntPtr sctp, Scap scap)
        {
            ScpCommands.DoIO(sctp, 0xF1, (byte)scap, new[] { 0x80, 0x81, 0x82 });

            ScapCommands Scap;

            switch (scap)
            {
            case SCP.Scap.T0:
                Scap = new Scap3Commands();
                break;

            /*case SCAP.T1:
             *                  Scap = new SCAPxCommands();
             *                  break;*/
            default:
                throw new ScpException(LowLevelError.CardNotSupported);
            }

            ScpCommands.scapsByHandle[sctp] = Scap;
        }
Exemplo n.º 2
0
 public static string GetVersionString(IntPtr sctp, Scap scap)
 {
     byte[] Response = ScpCommands.DoIO(sctp, 0xF6, new[] { (byte)scap }, 0xF0);
     return(new string(Encoding.ASCII.GetChars(Response)));
 }