예제 #1
0
        /// <summary>
        /// Loads and initializes a CNG key storage provider.
        /// </summary>
        /// <param name="providerName">
        /// A pointer to a null-terminated Unicode string that identifies the key storage provider to load. This is the registered alias of the key storage provider. This parameter is optional and can be NULL. If this parameter is NULL, the default key storage provider is loaded. The <see cref="KeyStorageProviders"/> class identifies the built-in key storage providers.
        /// </param>
        /// <param name="flags">Flags that modify the behavior of the function.</param>
        /// <returns>
        /// A <see cref="SafeProviderHandle"/> variable that receives the provider handle. When you have finished using this handle, dispose of it.
        /// </returns>
        public static SafeProviderHandle NCryptOpenStorageProvider(
            string providerName,
            NCryptOpenStorageProviderFlags flags = NCryptOpenStorageProviderFlags.None)
        {
            SafeProviderHandle handle;

            NCryptOpenStorageProvider(out handle, providerName, flags).ThrowOnError();
            return(handle);
        }
예제 #2
0
 public static extern SECURITY_STATUS NCryptOpenStorageProvider(
     out SafeProviderHandle phProvider,
     string pszProviderName,
     NCryptOpenStorageProviderFlags dwFlags = NCryptOpenStorageProviderFlags.None);
예제 #3
0
 public static extern SECURITY_STATUS NCryptOpenStorageProvider(
     out SafeProviderHandle phProvider,
     string pszProviderName,
     NCryptOpenStorageProviderFlags dwFlags = NCryptOpenStorageProviderFlags.None);
예제 #4
0
		public SECURITY_STATUS NCryptOpenStorageProvider(
            out SafeProviderHandle phProvider,
            string pszProviderName,
            NCryptOpenStorageProviderFlags dwFlags = NCryptOpenStorageProviderFlags.None)
			=> NCryptOpenStorageProvider(out phProvider, pszProviderName, dwFlags );