A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://richardschneider.github.io/net-ipfs-core/api/Ipfs.MultiHash.html below:

Class MultiHash

A protocol for differentiating outputs from various well-established cryptographic hash functions, addressing size + encoding considerations.

Namespace: Ipfs Assembly: Ipfs.Core.dll Syntax
[JsonConverter(typeof(MultiHash.Json))]
public class MultiHash : IEquatable<MultiHash>
Constructors | Improve this Doc View Source MultiHash(CodedInputStream)

Creates a new instance of the MultiHash class from the specified Google.Protobuf.CodedInputStream.

Declaration
public MultiHash(CodedInputStream stream)
Parameters Type Name Description Google.Protobuf.CodedInputStream stream

A Google.Protobuf.CodedInputStream containing the binary representation of the MultiHash.

| Improve this Doc View Source MultiHash(Byte[])

Creates a new instance of the MultiHash class from the specified byte array.

Declaration
public MultiHash(byte[] buffer)
Parameters Type Name Description Byte[] buffer

A sequence of bytes containing the binary representation of the MultiHash.

See Also | Improve this Doc View Source MultiHash(Stream)

Creates a new instance of the MultiHash class from the specified Stream.

Declaration
public MultiHash(Stream stream)
Parameters Type Name Description Stream stream

A Stream containing the binary representation of the MultiHash.

| Improve this Doc View Source MultiHash(String)

Creates a new instance of the MultiHash class from the specified Base58 encoded String.

Declaration
public MultiHash(string s)
Parameters See Also | Improve this Doc View Source MultiHash(String, Byte[])

Creates a new instance of the MultiHash class with the specified HashingAlgorithm and Digest value.

Declaration
public MultiHash(string algorithmName, byte[] digest)
Parameters Type Name Description String algorithmName

A valid IPFS hashing algorithm name, e.g. "sha2-256" or "sha2-512".

Byte[] digest

The digest value as a byte array.

Fields | Improve this Doc View Source DefaultAlgorithmName

The default hashing algorithm is "sha2-256".

Declaration
public const string DefaultAlgorithmName = "sha2-256"
Field Value | Improve this Doc View Source UnknownHashingAlgorithm

Occurs when an unknown hashing algorithm number is parsed.

Declaration
public static EventHandler<UnknownHashingAlgorithmEventArgs> UnknownHashingAlgorithm
Field Value Properties | Improve this Doc View Source Algorithm

The hashing algorithm.

Declaration
public HashingAlgorithm Algorithm { get; }
Property Value | Improve this Doc View Source Digest

The hashing algorithm's digest value.

Declaration
public byte[] Digest { get; }
Property Value Type Description Byte[]

The output of the hashing algorithm.

| Improve this Doc View Source IsIdentityHash

Determines if the identity hash algorithm is in use.

Declaration
public bool IsIdentityHash { get; }
Property Value Type Description Boolean

true if the identity hash algorithm is used; otherwise, false.

Methods | Improve this Doc View Source ComputeHash(Byte[], String)

Generate the multihash for the specified byte array.

Declaration
public static MultiHash ComputeHash(byte[] data, string algorithmName = "sha2-256")
Parameters Type Name Description Byte[] data

The byte array containing the data to hash.

String algorithmName

The name of the hashing algorithm to use; defaults to DefaultAlgorithmName.

Returns | Improve this Doc View Source ComputeHash(Stream, String)

Generate the multihash for the specified Stream.

Declaration
public static MultiHash ComputeHash(Stream data, string algorithmName = "sha2-256")
Parameters Returns | Improve this Doc View Source Equals(MultiHash) Declaration
public bool Equals(MultiHash that)
Parameters Returns | Improve this Doc View Source Equals(Object) Declaration
public override bool Equals(object obj)
Parameters Type Name Description Object obj Returns Overrides | Improve this Doc View Source GetHashAlgorithm(String)

Gets the HashAlgorithm with the specified IPFS multi-hash name.

Declaration
public static HashAlgorithm GetHashAlgorithm(string name = "sha2-256")
Parameters Returns Type Description HashAlgorithm

The hashing implementation associated with the name. After using the hashing algorithm it should be disposed.

Exceptions | Improve this Doc View Source GetHashAlgorithmName(Int32)

Gets the name of hashing algorithm name with the specified code.

Declaration
public static string GetHashAlgorithmName(int code)
Parameters Returns Type Description String

The name assigned to code.

Exceptions | Improve this Doc View Source GetHashCode() Declaration
public override int GetHashCode()
Returns Overrides | Improve this Doc View Source Matches(Byte[])

Determines if the data matches the hash.

Declaration
public bool Matches(byte[] data)
Parameters Type Name Description Byte[] data

The data to check.

Returns Type Description Boolean

true if the data matches the MultiHash; otherwise, false.

| Improve this Doc View Source Matches(Stream)

Determines if the stream data matches the hash.

Declaration
public bool Matches(Stream data)
Parameters Type Name Description Stream data

The Stream containing the data to check.

Returns Type Description Boolean

true if the data matches the MultiHash; otherwise, false.

| Improve this Doc View Source ToArray()

Returns the IPFS binary representation as a byte array.

Declaration Returns Type Description Byte[]

A byte array.

| Improve this Doc View Source ToBase32()

Returns the Base32 encoding of the MultiHash.

Declaration Returns | Improve this Doc View Source ToBase58()

Returns the Base58 encoding of the MultiHash.

Declaration Returns | Improve this Doc View Source ToString()

Returns the Base58 encoding of the MultiHash.

Declaration
public override string ToString()
Returns Type Description String

A base-58 representaton of the MultiHash.

Overrides See Also | Improve this Doc View Source Write(CodedOutputStream)

Writes the binary representation of the multihash to the specified Google.Protobuf.CodedOutputStream.

Declaration
public void Write(CodedOutputStream stream)
Parameters Type Name Description Google.Protobuf.CodedOutputStream stream

The Google.Protobuf.CodedOutputStream to write to.

| Improve this Doc View Source Write(Stream)

Writes the binary representation of the multihash to the specified Stream.

Declaration
public void Write(Stream stream)
Parameters Operators | Improve this Doc View Source Equality(MultiHash, MultiHash)

Value equality.

Declaration
public static bool operator ==(MultiHash a, MultiHash b)
Parameters Returns | Improve this Doc View Source Implicit(String to MultiHash)

Implicit casting of a String to a MultiHash.

Declaration
public static implicit operator MultiHash(string s)
Parameters Returns | Improve this Doc View Source Inequality(MultiHash, MultiHash)

Value inequality.

Declaration
public static bool operator !=(MultiHash a, MultiHash b)
Parameters Returns Implements See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4