Tests.EncryptExceptionTests.EncryptionInvalidPublicKeyInPairTest C# (CSharp) Method

EncryptionInvalidPublicKeyInPairTest() private method

private EncryptionInvalidPublicKeyInPairTest ( ) : void
return void
		public void EncryptionInvalidPublicKeyInPairTest()
		{
			const string privateKey = "1158b1ea7d45919968b87dab6cab27eff5871304ea9856588e9ec02a6d93c42e";
			const string publicKey =
				"863df54207c285feac2c22235c336869fee8dba6605b8e1bc45cc8aa5e1be3fd7e53781865717d686cb3fee427823ffd8c71ea6a4d8f79c0b410457c9f881fa3";
			var testKeyPair = new KeyPair(Utilities.HexToBinary(publicKey), Utilities.HexToBinary(privateKey));

			Assert.Throws<ArgumentOutOfRangeException>(
				() => { Cryptor.EncryptFileWithStream(testKeyPair, "badfile"); });
		}