keccak 1.0.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 71

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

example/example.dart

// 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:


dependencies:
  keccak: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages 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';
  
Version Uploaded Documentation Archive
1.0.3 Jan 15, 2019 Go to the documentation of keccak 1.0.3 Download keccak 1.0.3 archive
1.0.2 Jan 15, 2019 Go to the documentation of keccak 1.0.2 Download keccak 1.0.2 archive
1.0.1 Jan 15, 2019 Go to the documentation of keccak 1.0.1 Download keccak 1.0.1 archive
1.0.0 Jan 14, 2019 Go to the documentation of keccak 1.0.0 Download keccak 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
42
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Apr 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:keccak/keccak.dart.

Dependencies

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