CCNet.Build.Common.SecureConfig.Initialize C# (CSharp) Method

Initialize() public static method

Initializes a secured storage using certificate with specified thumbprint.
public static Initialize ( string thumbprint ) : void
thumbprint string
return void
		public static void Initialize(string thumbprint)
		{
			var certificate = Find(thumbprint);

			if (certificate == null)
				throw new InvalidOperationException("Cannot find the required certificate.");

			if (!certificate.HasPrivateKey)
				throw new InvalidOperationException("The required certificate has no private key.");

			s_encryptor = new CertificateEncryptor(certificate);
		}