decode static method

Uint8List decode(
  1. int expectPrefix,
  2. String src
)

decide public expect prefix throw exception if error

Implementation

static Uint8List decode(int expectPrefix, String src) {
  var res = _decode(src);
  if (res[0][0] != expectPrefix) {
    throw NkeysException('encode invalid prefix');
  }
  return res[1];
}