Show / Hide Table of Contents

Struct Nonce

An arbitrary System.Bytes that is used as salt for deriving from its content.

Implements
IEquatable<Nonce>
Inherited Members
Object.Equals(Object, Object)
System.Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Common
Assembly: Libplanet.Common.dll
Syntax
[JsonConverter(typeof(NonceJsonConverter))]
public struct Nonce : IEquatable<Nonce>

Constructors

| Improve this Doc View Source

Nonce(Byte[])

Converts a System.Byte array into a Nonce value.

This constructor is an inverse function of ToByteArray() method.

Declaration
public Nonce(byte[] nonce)
Parameters
Type Name Description
System.Byte[] nonce

A System.Byte array to convert to a Nonce object. It must not be null.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when the given nonce is a null.

See Also
ToByteArray()
| Improve this Doc View Source

Nonce(in ImmutableArray<Byte>)

Converts an immutable System.Byte array into a Nonce instance.

This constructor is inverse of ByteArray property.

Declaration
public Nonce(in ImmutableArray<byte> nonce)
Parameters
Type Name Description
System.Collections.Immutable.ImmutableArray<System.Byte> nonce

An immutable System.Byte array to convert to a Nonce instance.

See Also
ByteArray

Properties

| Improve this Doc View Source

ByteArray

A bare immutable System.Byte array of the nonce.

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

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

See Also
ToByteArray()

Methods

| Improve this Doc View Source

Equals(Nonce)

An arbitrary System.Bytes that is used as salt for deriving from its content.

Declaration
public bool Equals(Nonce other)
Parameters
Type Name Description
Nonce other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Object)

An arbitrary System.Bytes that is used as salt for deriving from its content.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

An arbitrary System.Bytes that is used as salt for deriving from its content.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
ValueType.GetHashCode()
| Improve this Doc View Source

ToByteArray()

Gets a bare mutable System.Byte array of the nonce.

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

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

See Also
ByteArray
| Improve this Doc View Source

ToString()

Gets a hexadecimal representation of a Nonce.

Declaration
[Pure]
public override string ToString()
Returns
Type Description
String

A hexadecimal representation of a Nonce.

Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Equality(Nonce, Nonce)

An arbitrary System.Bytes that is used as salt for deriving from its content.

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

Inequality(Nonce, Nonce)

An arbitrary System.Bytes that is used as salt for deriving from its content.

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

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium