private void Init()
        {
            byte[] codyMasterSeed = Encoding.Unicode.GetBytes("CodyMasterRockeySeed");

            ushort pCount = 0;
            var    pt     = RockeyArmHelper.EnumRockeyArm(out pCount);

            if (pCount > 1)
            {
                throw new Exception("加密锁不止一个!");
            }
            else if (pCount == 0)
            {
                throw new Exception("没有找到加密锁!");
            }
            else
            {
                DONGLE_INFO pDongleInfo = (DONGLE_INFO)Marshal.PtrToStructure((IntPtr)(UInt32)pt, typeof(DONGLE_INFO));
                if (pDongleInfo.m_PID != DefaultPid)
                {
                    throw new Exception("加密锁已被初始化!");
                }
            }

            uint hDongle = 0;

            RockeyArmHelper.OpenRockey(ref hDongle, 0);
            RockeyArmHelper.VerifyPIN(hDongle, DefaultAdminPin);
            RockeyArmHelper.GenUniqueKey(hDongle, codyMasterSeed);

            RockeyArmHelper.CloseRockey(hDongle);
        }