コード例 #1
0
        /// <summary>
        /// Adds and removes keys.
        /// </summary>
        /// <param name="crypto">crypto engine</param>
        /// <param name="member">member</param>
        public static void Keys(ICryptoEngine crypto, TppMember member)
        {
            Key lowKey = crypto.GenerateKey(Key.Types.Level.Low);

            member.ApproveKeyBlocking(lowKey);

            Key standardKey   = crypto.GenerateKey(Key.Types.Level.Standard);
            Key privilegedKey = crypto.GenerateKey(Key.Types.Level.Privileged);

            member.ApproveKeysBlocking(new[] { standardKey, privilegedKey });

            member.RemoveKeyBlocking(lowKey.Id);
        }