signExport function

Map<String, Object?> signExport(
  1. Map<String, Object?> data,
  2. String secret
)

Signs data (the output of StorageService.exportAll()) with an HMAC-SHA256 keyed by secret, returning a new map equal to data plus one reserved checksumKey entry holding the hex-encoded digest.

Implementation

Map<String, Object?> signExport(Map<String, Object?> data, String secret) {
  return {...data, checksumKey: _hmac(data, secret)};
}