Giter Club home page Giter Club logo

crypt3's Introduction

Crypt3

This crate is a clone of the linux crypt command. It is a wrapper for the crypto algorithms used in crypt - Md5, blowfish, SHA256 and SHA512. The algorithm is chosen based on the first 3 characters of the secret. If it starts with $x$ where x is one of 1, 2, 3, 5 or 6.

Till this release (0.1), only MD5($1$), SHA256 ($5$) and SHA512 ($6$) are supported.

SECURITY ALERT:

The package is provided for the purposes of interoperability with protocols and systems that mandate the use of MD5. However, MD5 should be considered cryptographically broken and unsuitable for further use. Collision attacks against MD5 are both practical and trivial, and theoretical attacks against MD5 have been found. RFC6151 advises no new protocols to be designed with any MD5-based constructions, including HMAC-MD5.

INSTALLATION:

To add crypt to your package, add this to your Cargo.toml:

[dependencies]
crypt3 = "0.1"

EXAMPLES:

use crypt3::crypt;

pub fn foo() {
   let digest = crypt(b"abcdefghijklmnop", b"$1$");
}

License

Licensed under either of

at your option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.