Show / Hide Table of Contents

Struct EvidenceId

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Implements
ISerializable
IEquatable<EvidenceId>
IComparable<EvidenceId>
IComparable
IBencodable
Namespace: Libplanet.Types.Evidence
Assembly: Libplanet.Types.dll
Syntax
public readonly struct EvidenceId

Constructors

| Improve this Doc View Source

EvidenceId(in ImmutableArray<Byte>)

Converts an immutable array into a EvidenceId.

Declaration
public EvidenceId(in ImmutableArray<byte> evidenceId)
Parameters
Type Name Description
ImmutableArray<System.Byte> evidenceId

An immutable array that encodes a EvidenceId. It must not be null, and its must be the same to Size.

See Also
Id
| Improve this Doc View Source

EvidenceId(IValue)

Creates a EvidenceId instance from given bencoded.

Declaration
public EvidenceId(IValue bencoded)
Parameters
Type Name Description
IValue bencoded

A Bencodex of 32 s which represents an EvidenceId.

See Also
EvidenceId(in ImmutableArray<Byte>)
| Improve this Doc View Source

EvidenceId(SerializationInfo, StreamingContext)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public EvidenceId(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
See Also
Id
| Improve this Doc View Source

EvidenceId(Byte[])

Converts a mutable array into a EvidenceId.

Declaration
public EvidenceId(byte[] evidenceId)
Parameters
Type Name Description
System.Byte[] evidenceId

A mutable array that encodes a EvidenceId. It must not be null, and its must be the same to Size.

See Also
Id

Fields

| Improve this Doc View Source

Size

The s size that each EvidenceId takes.

As a evidenceId is a SHA-256 digest, it is 32 s.

Declaration
public const int Size = null
Field Value
Type Description
System.Int32
See Also
Id

Properties

| Improve this Doc View Source

Bencoded

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly IValue Bencoded { get; }
Property Value
Type Description
IValue
See Also
Id
| Improve this Doc View Source

ByteArray

A bare immutable array of this EvidenceId.

Declaration
public readonly ImmutableArray<byte> ByteArray { get; }
Property Value
Type Description
ImmutableArray<System.Byte>
Remarks

It is immutable. For a mutable array, use ToByteArray() method instead.

See Also
ToByteArray()
| Improve this Doc View Source

DefaultByteArray

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static readonly ImmutableArray<byte> DefaultByteArray { get; }
Property Value
Type Description
ImmutableArray<System.Byte>
See Also
Id

Methods

| Improve this Doc View Source

CompareTo(EvidenceId)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly int CompareTo(EvidenceId other)
Parameters
Type Name Description
EvidenceId other
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

CompareTo(Nullable<Object>)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly int CompareTo(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

Equals(EvidenceId)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly bool Equals(EvidenceId other)
Parameters
Type Name Description
EvidenceId other
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

Equals(Nullable<Object>)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public override readonly bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

GetHashCode()

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public override readonly int GetHashCode()
Returns
Type Description
System.Int32
See Also
Id
| Improve this Doc View Source

GetObjectData(SerializationInfo, StreamingContext)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public readonly void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info
StreamingContext context
See Also
Id
| Improve this Doc View Source

Parse(String)

Creates a EvidenceId value from a hex string.

Declaration
public static EvidenceId Parse(string hex)
Parameters
Type Name Description
System.String hex

A hexadecimal string which encodes a EvidenceId. This has to contain 64 hexadecimal digits and must not be null This is usually made by ToString() method.

Returns
Type Description
EvidenceId

A corresponding EvidenceId value.

See Also
ToString()
| Improve this Doc View Source

ToByteArray()

Gets a bare mutable array of this EvidenceId.

Declaration
public readonly byte[] ToByteArray()
Returns
Type Description
System.Byte[]

A new mutable array of this EvidenceId. Since a returned array is created every time the method is called, any mutations on that array does not affect to the EvidenceId object.

See Also
ByteArray
| Improve this Doc View Source

ToString()

Gets a EvidenceId's representative string.

Declaration
public override readonly string ToString()
Returns
Type Description
System.String

A string which represents this EvidenceId.

See Also
Id
| Improve this Doc View Source

TryParse(String, out Nullable<EvidenceId>)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static bool TryParse(string hex, out EvidenceId? evidenceId)
Parameters
Type Name Description
System.String hex
System.Nullable<EvidenceId> evidenceId
Returns
Type Description
System.Boolean
See Also
Id

Operators

| Improve this Doc View Source

Equality(EvidenceId, EvidenceId)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static bool operator ==(EvidenceId left, EvidenceId right)
Parameters
Type Name Description
EvidenceId left
EvidenceId right
Returns
Type Description
System.Boolean
See Also
Id
| Improve this Doc View Source

Inequality(EvidenceId, EvidenceId)

EvidenceId, abbreviation of Evidence identifier, is a SHA-256 digest derived from a EvidenceBase's content.

As it is a SHA-256 digest, it consists of 32 s, and 64 characters in hexadecimal. (See also Size constant.)

Declaration
public static bool operator !=(EvidenceId left, EvidenceId right)
Parameters
Type Name Description
EvidenceId left
EvidenceId right
Returns
Type Description
System.Boolean
See Also
Id

Implements

ISerializable
IEquatable<>
IComparable<>
IComparable
IBencodable

See Also

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