fromBytes static method

KeyId fromBytes(
  1. ByteData data
)

Implementation

static KeyId fromBytes(ByteData data) {
  final nativeData = ByteSlice.fromBytes(data);
  try {
    final id = DartApi.native.keyId
        .fromBytes(nativeData.addressOf)
        .extract((res) => res.asPointer<Void>());
    return KeyId(id, true);
  } finally {
    nativeData.dispose();
  }
}