Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Add Wasm support
Browse files Browse the repository at this point in the history
Since dart:html is not supported when compiling to Wasm, the correct alternative now is to use dart.library.js_interop to differentiate between native and web

Source:
https://dart.dev/interop/js-interop/package-web
  • Loading branch information
h1376h authored Aug 12, 2024
1 parent 1216790 commit b1426b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/sha512.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'dart:convert';
import 'digest.dart';
import 'hash.dart';
// ignore: uri_does_not_exist
import 'sha512_fastsinks.dart' if (dart.library.html) 'sha512_slowsinks.dart';
import 'sha512_fastsinks.dart' if (dart.library.js_interop) 'sha512_slowsinks.dart';
import 'utils.dart';

/// An implementation of the [SHA-384][rfc] hash function.
Expand Down

0 comments on commit b1426b9

Please sign in to comment.