CryptGenKey

[DllImport("Advapi32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool CryptGenKey(
   IntPtr hProv,
   uint Algid,
   uint dwFlags,
   out IntPtr phKey
);

Microsoft documentation: Link

Last updated