Property | Type | Description | |
---|---|---|---|
UnknownHashingAlgorithm | EventHandler |
Method | Description | |
---|---|---|
ComputeHash ( Stream data, string algorithmName = DefaultAlgorithmName ) : |
Generate the multihash for the specified data.
|
|
ComputeHash ( byte data, string algorithmName = DefaultAlgorithmName ) : |
Generate the multihash for the specified data.
|
|
GetHashAlgorithm ( string name = DefaultAlgorithmName ) : |
Gets the HashAlgorithm with the specified IPFS multi-hash name.
|
|
Matches ( Stream data ) : bool |
Determines if the stream data matches the hash. Matches is used to ensure data integrity. |
|
Matches ( byte data ) : bool |
Determines if the data matches the hash. Matches is used to ensure data integrity. |
|
MultiHash ( |
Creates a new instance of the MultiHash class from the specified CodedInputStream. Reads the binary representation of MultiHash from the stream. The binary representation is a 1-byte HashingAlgorithm.Code, 1-byte HashingAlgorithm.DigestSize followed by the Digest. This behaviour allows parsing of any well formed MultiHash even when the hashing algorithm is unknown. |
|
MultiHash ( Stream stream ) : System |
Creates a new instance of the MultiHash class from the specified Stream. Reads the binary representation of MultiHash from the stream. The binary representation is a 1-byte HashingAlgorithm.Code, 1-byte HashingAlgorithm.DigestSize followed by the Digest. This behaviour allows parsing of any well formed MultiHash even when the hashing algorithm is unknown. |
|
MultiHash ( string s ) : System |
Creates a new instance of the MultiHash class from the specified Base58 encoded string. This behaviour allows parsing of any well formed MultiHash even when the hashing algorithm is unknown. |
|
MultiHash ( string algorithmName, byte digest ) : System |
Creates a new instance of the MultiHash class with the specified HashingAlgorithm">Algorithm name and |
|
RaiseUnknownHashingAlgorithm ( HashingAlgorithm algorithm ) : void | ||
Read ( |
||
Read ( Stream stream ) : void | ||
ToArray ( ) : byte[] |
Returns the IPFS binary representation as a byte array. The binary representation is a sequence of MultiHash. |
|
ToBase58 ( ) : string |
Returns the Base58 encoding of the MultiHash.
|
|
ToString ( ) : string |
Returns the Base58 encoding of the MultiHash.
|
|
Write ( |
Writes the binary representation to the specified CodedOutputStream. The binary representation is a 1-byte HashingAlgorithm.Code, 1-byte HashingAlgorithm.DigestSize followed by the Digest. |
|
Write ( Stream stream ) : void |
Writes the binary representation to the specified Stream. The binary representation is a 1-byte HashingAlgorithm.Code, 1-byte HashingAlgorithm.DigestSize followed by the Digest. |
Method | Description | |
---|---|---|
MultiHash ( ) : System |
Register the standard hash algorithms for IPFS.
|
public static ComputeHash ( Stream data, string algorithmName = DefaultAlgorithmName ) : |
||
data | Stream |
/// The |
algorithmName | string |
/// The name of the hashing algorithm to use; defaults to |
return |
public static ComputeHash ( byte data, string algorithmName = DefaultAlgorithmName ) : |
||
data | byte |
/// The |
algorithmName | string |
/// The name of the hashing algorithm to use; defaults to |
return |
public static GetHashAlgorithm ( string name = DefaultAlgorithmName ) : |
||
name | string | |
return |
public Matches ( Stream data ) : bool | ||
data | Stream |
/// The |
return | bool |
public Matches ( byte data ) : bool | ||
data | byte | /// The data to check. /// |
return | bool |
public MultiHash ( |
||
stream | (
/// A |
|
return | System |
public MultiHash ( Stream stream ) : System | ||
stream | Stream | (
/// A |
return | System |
public MultiHash ( string s ) : System | ||
s | string |
/// A |
return | System |
public MultiHash ( string algorithmName, byte digest ) : System | ||
algorithmName | string | /// A valid IPFS hashing algorithm name, e.g. "sha2-256" or "sha2-512". /// |
digest | byte | /// The digest value as a byte array. /// |
return | System |
public RaiseUnknownHashingAlgorithm ( HashingAlgorithm algorithm ) : void | ||
algorithm | HashingAlgorithm | |
return | void |
public Read ( |
||
stream | ||
return | void |
public Write ( |
||
stream |
/// The |
|
return | void |
public Write ( Stream stream ) : void | ||
stream | Stream |
/// The |
return | void |