Table of Contents

Struct BitLength

Namespace
Kdf108
Assembly
Kdf108.dll

A positive length in bits. Every output, tag, and MAC length in this library is a BitLength.

public readonly record struct BitLength : IEquatable<BitLength>
Implements
Inherited Members

Properties

Bits

The length in bits.

public long Bits { get; }

Property Value

long

ByteLength

The number of bytes needed to hold Bits bits.

public int ByteLength { get; }

Property Value

int

Methods

Create(long)

Creates a bit length.

public static BitLength Create(long bits)

Parameters

bits long

Returns

BitLength

Exceptions

KdfParameterException

bits is not positive.

FromBytes(int)

Creates a bit length from a whole number of bytes.

public static BitLength FromBytes(int bytes)

Parameters

bytes int

Returns

BitLength

Exceptions

KdfParameterException

bytes is not positive.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.