Bytes class

Misc byte helpers.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

ivLabel Uint8List
ASCII label "iv" as bytes (used in IV derivation).
final
tagLabel Uint8List
ASCII label "tag" as bytes (used in MAC derivation).
final

Static Methods

concat(List<Uint8List> parts) Uint8List
Concatenates multiple byte arrays into a single Uint8List.
constantTimeEquals(Uint8List a, Uint8List b) bool
Constant-time comparison of two byte arrays.
copy(Uint8List src) Uint8List
Returns a defensive copy of src.
fromBase64Strict(String b64) Uint8List
Decodes a standard Base64 string to bytes.
secureZero(Uint8List buf) → void
Overwrites the contents of buf with zeros.
toBase64(Uint8List data) String
Encodes data as standard Base64 (with padding).
u64be(BigInt value) Uint8List
Encodes an unsigned 64-bit BigInt as big-endian 8 bytes.
u64beInt(int value) Uint8List
Encodes an unsigned 64-bit integer as big-endian 8 bytes.
u64beToBigInt(Uint8List bytes, [int offset = 0]) BigInt
Decodes 8 bytes big-endian into a non-negative BigInt.
utf8Decode(Uint8List b) String
UTF-8 decode helper.
utf8Encode(String s) Uint8List
UTF-8 encode helper (labels, non-secrets).