DigOutputStream.cs
445 Bytes
using System;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Utilities.IO;
namespace Org.BouncyCastle.Cms
{
internal class DigOutputStream
: BaseOutputStream
{
private readonly IDigest dig;
internal DigOutputStream(IDigest dig)
{
this.dig = dig;
}
public override void WriteByte(byte b)
{
dig.Update(b);
}
public override void Write(byte[] b, int off, int len)
{
dig.BlockUpdate(b, off, len);
}
}
}