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
ByteLength
The number of bytes needed to hold Bits bits.
public int ByteLength { get; }
Property Value
Methods
Create(long)
Creates a bit length.
public static BitLength Create(long bits)
Parameters
bitslong
Returns
Exceptions
- KdfParameterException
bitsis not positive.
FromBytes(int)
Creates a bit length from a whole number of bytes.
public static BitLength FromBytes(int bytes)
Parameters
bytesint
Returns
Exceptions
- KdfParameterException
bytesis not positive.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.