Пример #1
0
 /// <summary>
 /// Lookup/create a key set for a scheme.
 /// </summary>
 /// <param name="scheme"></param>
 /// <returns></returns>
 private IKeySet NewKeysetFor(KeyScheme scheme)
 {
     if (scheme.IsDual())
         return NewKeysetFor((DualKeyScheme)scheme);
     else
         return NewKeysetFor((SingleKeyScheme)scheme);
 }
Пример #2
0
        /// <summary>
        /// Get the key set for a given scheme. This set should not be modified.
        /// </summary>
        /// <param name="scheme">The scheme.</param>
        /// <returns>The key set for the scheme. Will be empty if no keys are
        ///        defined for the scheme.</returns>
        private IKeySet KeysetFor(KeyScheme scheme)
        {
            IKeySet keys;

            if (!keySets.TryGetValue(scheme, out keys))
                return scheme.IsDual() ? (IKeySet)EmptyDualKeyset : (IKeySet)EmptySingleKeyset;
            else
                return keys;
        }