Exemple #1
0
        public YubikeyNeoDeviceHandle()
        {
            IntPtr intPtr = IntPtr.Zero;

            YubikeyNeoNative.YkNeoManagerInit(ref intPtr);
            Device = intPtr;
        }
Exemple #2
0
        internal YubikeyNeoDevice(string name)
        {
            YubicoNeoReturnCode code = YubikeyNeoNative.YkNeoManagerInit(ref _currentDevice);

            if (code != YubicoNeoReturnCode.YKNEOMGR_OK)
            {
                throw new Exception("Unable to init: " + code);
            }

            YubikeyNeoNative.YkNeoManagerConnect(_currentDevice, name);
        }