Esempio n. 1
0
        /// <summary>
        /// Creates slot with specified handle
        /// </summary>
        /// <param name="factories">Factories to be used by Developer and Pkcs11Interop library</param>
        /// <param name="pkcs11Library">Low level PKCS#11 wrapper</param>
        /// <param name="slotId">PKCS#11 handle of slot</param>
        public ISlot Create(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong slotId)
        {
            LowLevelAPI80.MockPkcs11Library p11 = pkcs11Library as LowLevelAPI80.MockPkcs11Library;
            if (p11 == null)
            {
                throw new ArgumentException("Incorrect type of low level PKCS#11 wrapper");
            }

            return(new MockSlot(factories, p11, slotId));
        }
        /// <summary>
        /// Initializes session with specified handle
        /// </summary>
        /// <param name="factories">Factories to be used by Developer and Pkcs11Interop library</param>
        /// <param name="pkcs11Library">Low level PKCS#11 wrapper</param>
        /// <param name="sessionId">PKCS#11 handle of session</param>
        public ISession Create(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong sessionId)
        {
            LowLevelAPI40.Pkcs11Library p11 = pkcs11Library as LowLevelAPI40.Pkcs11Library;
            if (p11 == null)
            {
                throw new ArgumentException("Incorrect type of low level PKCS#11 wrapper");
            }

            return(new Session(factories, p11, sessionId));
        }
 public IRutokenSlot CreateRutoken(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong slotId)
 {
     return((IRutokenSlot)Create(factories, pkcs11Library, slotId));
 }
 public ISlot Create(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong slotId)
 {
     return(_factory.Create(factories, pkcs11Library, slotId));
 }
 /// <summary>
 /// Initializes session with specified handle
 /// </summary>
 /// <param name="factories">Factories to be used by Developer and Pkcs11Interop library</param>
 /// <param name="pkcs11Library">Low level PKCS#11 wrapper</param>
 /// <param name="sessionId">PKCS#11 handle of session</param>
 public ISession Create(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong sessionId)
 {
     return(_factory.Create(factories, pkcs11Library, sessionId));
 }
Esempio n. 6
0
 public IRutokenSession CreateRutoken(Pkcs11InteropFactories factories, LowLevelPkcs11Library pkcs11Library, ulong sessionId)
 {
     return((IRutokenSession)Create(factories, pkcs11Library, sessionId));
 }