예제 #1
0
        /// <summary>
        /// Copies the cryptoki object.
        /// </summary>
        /// <param name="template">The object attribute template.</param>
        /// <returns>The new cryptoki object.</returns>
        public CryptokiObject Copy(CryptokiAttribute[] template)
        {
            CryptokiObject ret = CopyInternal(template);

            m_session.AddSessionObject(ret);

            return(ret);
        }
예제 #2
0
        /// <summary>
        /// Creates a object in the given Cryptoki session context with specified object atrributes.
        /// </summary>
        /// <param name="session">The Cryptoki session context.</param>
        /// <param name="template">The object attribute template.</param>
        /// <returns>The cryptoki object created.</returns>
        public static CryptokiObject CreateObject(Session session, CryptokiAttribute[] template)
        {
            CryptokiObject ret = CreateObjectInternal(session, template);

            session.AddSessionObject(ret);

            return(ret);
        }