Show / Hide Table of Contents

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

Inheritance
object
Hash
Hash128
Hash160
Hash192
Hash256
Implements
ISerializedType
Namespace: Xrpl.BinaryCodec.Types
Assembly: Xrpl.BinaryCodec.dll
Syntax
public abstract class Hash : ISerializedType

Constructors

| Edit this page View Source

Hash(byte[])

Defines how to construct Hash from buffer

Declaration
protected Hash(byte[] buffer)
Parameters
Type Name Description
byte[] buffer

bytes buffer

Fields

| Edit this page View Source

Buffer

Bytes buffer

Declaration
public readonly byte[] Buffer
Field Value
Type Description
byte[]

Methods

| Edit this page View Source

Equals(Hash)

check hash to equal

Declaration
public bool Equals(Hash other)
Parameters
Type Name Description
Hash other

other hash

Returns
Type Description
bool
| Edit this page View Source

ToBytes(IBytesSink)

Hash to bytes

Declaration
public void ToBytes(IBytesSink sink)
Parameters
Type Name Description
IBytesSink sink

Bytes Sink

| Edit this page View Source

ToJson()

hash to json string

Declaration
public JsonNode ToJson()
Returns
Type Description
JsonNode
| Edit this page View Source

ToString()

hash to string value

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

| Edit this page View Source

explicit operator string(Hash)

Declaration
public static explicit operator string(Hash h)
Parameters
Type Name Description
Hash h
Returns
Type Description
string

Implements

ISerializedType

Extension Methods

StExtensions.ToDebuggedHex(ISerializedType)
StExtensions.ToHex(ISerializedType)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX