We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0123856 commit 4f2f534Copy full SHA for 4f2f534
crypto/src/crypto/tls/DigestInputBuffer.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.IO;
3
4
+using Org.BouncyCastle.Crypto.IO;
5
using Org.BouncyCastle.Utilities.IO;
6
7
namespace Org.BouncyCastle.Crypto.Tls
@@ -10,28 +11,7 @@ internal class DigestInputBuffer
10
11
{
12
internal void UpdateDigest(IDigest d)
13
- Streams.WriteBufTo(this, new DigStream(d));
14
- }
15
-
16
- private class DigStream
17
- : BaseOutputStream
18
- {
19
- private readonly IDigest d;
20
21
- internal DigStream(IDigest d)
22
23
- this.d = d;
24
25
26
- public override void WriteByte(byte b)
27
28
- d.Update(b);
29
30
31
- public override void Write(byte[] buf, int off, int len)
32
33
- d.BlockUpdate(buf, off, len);
34
+ Streams.WriteBufTo(this, new DigestSink(d));
35
}
36
37
0 commit comments