Org.BouncyCastle.Asn1.Pkcs.EncryptedPrivateKeyInfo.GetInstance C# (CSharp) Method

GetInstance() public static method

public static GetInstance ( object obj ) : EncryptedPrivateKeyInfo
obj object
return EncryptedPrivateKeyInfo
		public static EncryptedPrivateKeyInfo GetInstance(
             object obj)
        {
			if (obj is EncryptedPrivateKeyInfo)
			{
				return (EncryptedPrivateKeyInfo) obj;
			}

			if (obj is Asn1Sequence)
			{
				return new EncryptedPrivateKeyInfo((Asn1Sequence) obj);
			}

			throw new ArgumentException("Unknown object in factory: " + obj.GetType().FullName, "obj");
		}