diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-02-19 21:03:22 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-02-19 21:03:22 +0700 |
commit | ad0b6c99d34da50d5473a9c14837a9ce199d0200 (patch) | |
tree | fbe5e81540f15b7a3cca0401380d33bd9fbb9cc6 /crypto/src/asn1/LimitedInputStream.cs | |
parent | Case-insensitive check of boolean env. var. (diff) | |
download | BouncyCastle.NET-ed25519-ad0b6c99d34da50d5473a9c14837a9ce199d0200.tar.xz |
ASN.1 updates from bc-java
Diffstat (limited to 'crypto/src/asn1/LimitedInputStream.cs')
-rw-r--r-- | crypto/src/asn1/LimitedInputStream.cs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/crypto/src/asn1/LimitedInputStream.cs b/crypto/src/asn1/LimitedInputStream.cs index 62486aa77..98a45876d 100644 --- a/crypto/src/asn1/LimitedInputStream.cs +++ b/crypto/src/asn1/LimitedInputStream.cs @@ -8,23 +8,20 @@ namespace Org.BouncyCastle.Asn1 : BaseInputStream { protected readonly Stream _in; - private int _limit; + private int _limit; - internal LimitedInputStream( - Stream inStream, - int limit) + internal LimitedInputStream(Stream inStream, int limit) { this._in = inStream; - this._limit = limit; + this._limit = limit; } - internal virtual int GetRemaining() - { - // TODO: maybe one day this can become more accurate - return _limit; - } + internal virtual int Limit + { + get { return _limit; } + } - protected virtual void SetParentEofDetect(bool on) + protected virtual void SetParentEofDetect(bool on) { if (_in is IndefiniteLengthInputStream) { |