Encrypted.fromBase16 constructor

Encrypted.fromBase16(
  1. String encoded
)

Creates an Encrypted object from a hexdecimal string.

Implementation

Encrypted.fromBase16(String encoded)
    : _bytes = Uint8List.fromList(
        List.generate(encoded.length,
                (i) => i % 2 == 0 ? encoded.substring(i, i + 2) : null)
            .where((b) => b != null)
            .map((b) => int.parse(b, radix: 16))
            .toList(),
      );