Skip to content

Commit

Permalink
#14 optional provided key
Browse files Browse the repository at this point in the history
  • Loading branch information
turn-a-round committed Apr 23, 2020
1 parent e4126be commit 16d8e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sprightly/lib/utils/happy_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ enum HashLibrary {
}

String hashedAll(List<String> items,
{int hashLength = 16, HashLibrary library = HashLibrary.sha1}) {
var randomStr =
{int hashLength = 16, HashLibrary library = HashLibrary.sha1, String key}) {
var randomStr = key ??
(Random().nextInt(10000000) + DateTime.now().millisecondsSinceEpoch)
.toString();
var randomKey = utf8.encode(randomStr);
Expand Down

0 comments on commit 16d8e63

Please sign in to comment.