CID.createFromBytes constructor

CID.createFromBytes(
  1. List<int> input, [
  2. Multicodec codec = Multicodec.raw
])

Returns the CID representation of binary input.

input is hashed with SHA-256 and wrapped as a CID v1 with the given codec.

Implementation

factory CID.createFromBytes(
  final List<int> input, [
  final Multicodec codec = Multicodec.raw,
]) => CID.fromList(_toV1(_toMultihash(input), codec));