Show / Hide Table of Contents

Class HashAlgorithmTable

Inheritance
Object
HashAlgorithmTable
Namespace: Libplanet.Blocks
Assembly: Libplanet.dll
Syntax
public static class HashAlgorithmTable : object

Methods

| Improve this Doc View Source

ToHashAlgorithmGetter(IEnumerable<KeyValuePair<Int64, HashAlgorithmType>>)

Creates a HashAlgorithmGetter delegate from a table.

Declaration
public static HashAlgorithmGetter ToHashAlgorithmGetter(this IEnumerable<KeyValuePair<long, HashAlgorithmType>> table)
Parameters
Type Name Description
IEnumerable<KeyValuePair<Int64, HashAlgorithmType>> table

A table with block index offsets and their corresponding HashAlgorithmType. For example, 0: SHA1, 10: SHA256, 100: SHA512 means i => i >= 100 ? HashAlgorithmType.Of<SHA512>() : i >= 10 ? HashAlgorithmType.Of<SHA256>() : HashAlgorithmType.Of<SHA1>(). (Note that 0 means otherwise.) It must contain at least one entry with index 0, because it is the last fallback.

Returns
Type Description
HashAlgorithmGetter

A corresponding HashAlgorithmGetter.

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium