public static void Control(IntPtr connectionHandle, ReaderControlCode controlCode, byte[] inputData, ref byte[] buffer, out int dataSize)
        {
            var retCode = SCardControl(connectionHandle, (int)controlCode, inputData, inputData.Length, buffer, buffer.Length, out dataSize);

            if (SuccessCode != retCode)
            {
                throw ExceptionHelper.PrepareException(retCode, "SCardControl");
            }
        }
        public string Control(ReaderControlCode controlCode, string dataBytes)
        {
            var response = Control(controlCode, BinaryHelper.ConvertOctetStringToBytes(dataBytes)).ToArray();

            return(BinaryHelper.ConvertBytesToOctetString(response));
        }
        public IReadOnlyList <byte> Control(ReaderControlCode controlCode, IReadOnlyList <byte> dataBytes)
        {
            WinSCardWrapper.Control(Handle, controlCode, dataBytes.ToArray(), ref _buffer, out var dataSize);

            return(_buffer.Take(dataSize).ToArray());
        }