fromContent static method
Creates a CID by hashing data with SHA2-256.
The codec defaults to raw.
Implementation
static Future<CID> fromContent(Uint8List data, {String codec = 'raw'}) async {
final digest = sha256.convert(data).bytes;
final mh = MultihashUtils.sha256(Uint8List.fromList(digest));
return CID.v1(codec, mh);
}