Nonce class

Random initialization vector builder.

Inheritance
Implementers

Constructors

Nonce(List<int> data, [int? size])
Create a nonce from a list of bytes
factory
Nonce.bytes(List<int> data, [int? size])
Create a nonce from a list of bytes
factory
Nonce.hex(String data, [int? size])
Create a nonce from a Base-16 encoded string
factory
Nonce.random(int size)
Create a random salt value
factory
Nonce.zero(int size)
Create a nonce with zeros
factory

Properties

buffer ByteBuffer
Returns the byte buffer associated with this digest.
no setterinherited
bytes Uint8List
The collected bytes.
final
hashCode int
The hash code for this object.
no setterinherited
length int
Returns the length of this digest in bytes.
no setterinherited
lengthInBits int
Get the size of this nonce in bits
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

ascii() String
The message digest as a string of ASCII alphabets.
inherited
base32({bool upper = true, bool padding = true}) String
The message digest as a Base-32 string.
inherited
base64({bool urlSafe = false, bool padding = true}) String
The message digest as a Base-64 string with no padding.
inherited
bigInt({Endian endian = Endian.little}) BigInt
The message digest as a BigInt.
inherited
binary() String
The message digest as a binary string.
inherited
copyInto(Uint8List buffer, [int offset = 0, int? length]) Uint8List
Copies the bytes of this nonce into the buffer starting at the offset.
hex([bool upper = false]) String
The message digest as a hexadecimal string.
inherited
isEqual(dynamic other) bool
Checks if the message digest equals to other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
number([int bitLength = 64, Endian endian = Endian.big]) int
Gets unsiged integer of bitLength-bit from the message digest.
inherited
octal() String
The message digest as a octal string.
inherited
pad(int padLength) Nonce
Adds padLength bytes at the start and end filled with zeros.
padLeft(int padLength) Nonce
Adds padLength bytes at the start filled with zeros.
padRight(int padLength) Nonce
Adds padLength bytes at the end filled with zeros.
reverse() Nonce
Gets a nonce with reverse order of the underlying bytes
to(Encoding encoding) String
Returns the digest in the given encoding
inherited
toString() String
The message digest as a string of hexadecimal digits.
inherited
utf8() String
The message digest as a string of UTF-8 alphabets.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited