summary refs log tree commit diff
path: root/crypto/src/asn1/pkcs/EncryptedData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/pkcs/EncryptedData.cs')
-rw-r--r--crypto/src/asn1/pkcs/EncryptedData.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/pkcs/EncryptedData.cs b/crypto/src/asn1/pkcs/EncryptedData.cs
index 7e95eb586..6a4c04f25 100644
--- a/crypto/src/asn1/pkcs/EncryptedData.cs
+++ b/crypto/src/asn1/pkcs/EncryptedData.cs
@@ -52,7 +52,7 @@ namespace Org.BouncyCastle.Asn1.Pkcs
 			if (seq.Count != 2)
 				throw new ArgumentException("Wrong number of elements in sequence", "seq");
 
-			int version = ((DerInteger) seq[0]).Value.IntValue;
+            int version = ((DerInteger)seq[0]).IntValueExact;
 			if (version != 0)
             {
                 throw new ArgumentException("sequence not version 0");