referenciaDaPartitura function

String referenciaDaPartitura(
  1. String profUid,
  2. Uint8List bytes
)

A referĂȘncia de bytes enviados pelo professor profUid: SHA-256 em hexadecimal (64 caracteres, dentro de [a-z0-9]{8,64} da rotina).

Implementation

String referenciaDaPartitura(String profUid, Uint8List bytes) {
  final entrada = BytesBuilder(copy: false)
    ..add(utf8.encode('$profUid\n'))
    ..add(bytes);
  return sha256.convert(entrada.takeBytes()).toString();
}