IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IncrementalHashExtensions.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Reflection.Metadata;
4using System.Security.Cryptography;
5
7{
8
9 internal static class IncrementalHashExtensions
10 {
11
17 public static void AppendData(this IncrementalHash hash, IEnumerable<Blob> blobs)
18 {
19 foreach (var blob in blobs)
20 AppendData(hash, blob.GetBytes());
21 }
22
28 public static void AppendData(this IncrementalHash hash, IEnumerable<ArraySegment<byte>> blobs)
29 {
30 foreach (var blob in blobs)
31 AppendData(hash, blob);
32 }
33
39 public static void AppendData(this IncrementalHash hash, ArraySegment<byte> segment)
40 {
41 hash.AppendData(segment.Array, segment.Offset, segment.Count);
42 }
43
44 }
45
46}