keccak 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

Keccak #

A Dart implementation of pre-NIST keccak generally used in many cryptocurrencies.

1.0.3 #

  • Fixed pub issues link

1.0.2 #

  • Complete change to dart from flutter

1.0.1 #

  • Included Example

1.0.0 #

  • Initial version


// Copyright (c) 2018, Rashed Mohammed.
// Please see the included LICENSE file for more information.

import 'package:keccak/keccak.dart';
import 'dart:typed_data';
import 'package:convert/convert.dart';

void main() {
  // get the input
  String input = "";

  // convert input data into byte array (or) Uint8List
  var inputData = Uint8List.fromList(input.codeUnits);

  // compute the keccak hash
  // optionally specify the outputSize which should be
  // less than or equal to 32.
  var outputHashData = keccak(inputData);

  // if needed convert the output byte array into hex string.
  var output = hex.encode(outputHashData);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  keccak: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:keccak/keccak.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Maintenance suggestions

Package is getting outdated. (-3.29 points)

The package was last published 53 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
convert ^2.1.1 2.1.1
Transitive dependencies
charcode 1.1.2
typed_data 1.1.6
Dev dependencies
test ^1.5.1+1