crypt 0.0.1 copy "crypt: ^0.0.1" to clipboard
crypt: ^0.0.1 copied to clipboard

outdatedDart 1 only

One-way string hashing for salted passwords

example/crypt.dart

// Copyright (c) 2015, Hoylen Sue. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library crypt.example;

import 'package:crypt/crypt.dart';

main() {
  var hash1 = Crypt.sha256("p@ssw0rd"); // default rounds, random salt
  var hash2 = Crypt.sha256("p@ssw0rd", rounds: 10000); // random salt
  var hash3 = Crypt.sha256("p@ssw0rd", salt: "abcdefghijklmnop");
  var hash4 =
      Crypt.sha256("p@ssw0rd", rounds: 10000, salt: "abcdefghijklmnop");

  print("SHA-256:");
  print(hash1);
  print(hash2);
  print(hash3);
  print(hash4);
}

//EOF
36
likes
25
pub points
95%
popularity

Publisher

verified publisherhoylen.com

One-way string hashing for salted passwords

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

crypto

More

Packages that depend on crypt