⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keygenerator.cs

📁 怎样的图象处理的
💻 CS
字号:

//============================================================================================================
// Microsoft Updater Application Block for .NET
//  http://msdn.microsoft.com/library/en-us/dnbda/html/updater.asp
//	
// KeyGenerator.cs
// 
//============================================================================================================
// Copyright (C) 2000-2001 Microsoft Corporation
// All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
// FITNESS FOR A PARTICULAR PURPOSE.
//============================================================================================================


using System;
using System.Security.Cryptography;
using System.Xml;

namespace ManifestUtility
{
	public class KeyGenerator
	{
		private XmlDocument _privateKey;
		private XmlDocument _publicKey;

		public KeyGenerator()
		{
			//Use RSA Provider to generate public / private key pair
			RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

			//  create the xml-docs
			_privateKey = new XmlDocument();
			_publicKey = new XmlDocument();

			//  use RSA convenience methods to stuff public and private keys into dom's
			_privateKey.LoadXml( RSA.ToXmlString( true ));
			_publicKey.LoadXml(  RSA.ToXmlString( false ) );
		}

		public XmlDocument PrivateKey
		{
			get
			{
				return _privateKey;
			}
		}
		public XmlDocument PublicKey
		{
			get
			{
				return _publicKey;
			}
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -