Class Hash
The XRP Ledger has several "hash" types: Hash128, Hash160, and Hash256.
These fields contain arbitrary binary data of the given number of bits, which may or may not represent the result of a hash operation.
All such fields are serialized as the specific number of bits, with no length indicator, in big-endian byte order.
Base class defining how to encode and decode hashes
Namespace: Xrpl.BinaryCodec.Types
Assembly: Xrpl.BinaryCodec.dll
Syntax
public abstract class Hash : object, ISerializedType
Constructors
| Improve this Doc View SourceHash(Byte[])
Defines how to construct Hash from buffer
Declaration
protected Hash(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | bytes buffer |
Fields
| Improve this Doc View SourceBuffer
Bytes buffer
Declaration
public readonly byte[] Buffer
Field Value
Type | Description |
---|---|
System.Byte[] |
Methods
| Improve this Doc View SourceEquals(Hash)
check hash to equal
Declaration
public bool Equals(Hash other)
Parameters
Type | Name | Description |
---|---|---|
Hash | other | other hash |
Returns
Type | Description |
---|---|
System.Boolean |
ToBytes(IBytesSink)
Hash to bytes
Declaration
public void ToBytes(IBytesSink sink)
Parameters
Type | Name | Description |
---|---|---|
IBytesSink | sink | Bytes Sink |
ToJson()
hash to json string
Declaration
public JToken ToJson()
Returns
Type | Description |
---|---|
JToken |
ToString()
hash to string value
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Operators
| Improve this Doc View SourceExplicit(Hash to String)
Declaration
public static explicit operator string (Hash h)
Parameters
Type | Name | Description |
---|---|---|
Hash | h |
Returns
Type | Description |
---|---|
System.String |
Implements
IEquatable<>