Coder Social home page Coder Social logo

42_ft_ssl's Introduction

ft_ssl [md5] [sha256]

This is a 42 project. In this project, I have to code a program able to hash files and streams from STDIN. Final grade: 100/100

How to build

$ make

How to run

./ft_ssl <hash_algorithm> [options] [file]
./ft_ssl md5 [-p -q -r -s <string>] [file]
./ft_ssl sha256 [-p -q -r -s <string>] [file]

Options:

  • -p, echo STDIN to STDOUT, then append the checksum to STDOUT.
  • -q, quiet mode.
  • -r, reverse the output format.
  • -s, print the sum of the given string.

Usage with piped STDIN:

$ echo "Hello world" | ./ft_ssl [options]

How to run tests

$ make test

TODO:

REQUIRED:

  • Command parsing.
  • Files reading.
  • STDIN reading (piped).
  • md5 hash algorithm.
  • sha256 algorithm.
  • Norm

BONUSES:

  • Unittests
  • Read from STDIN.
  • sha512
  • whirlpool
  • other ?

42_ft_ssl's People

Contributors

fherbine avatar

Watchers

James Cloos avatar  avatar

42_ft_ssl's Issues

[stdin] Unclosed string overflow

current behavior:

$ echo "Magic mirror on the wall, think I wanna smash them all?" | ./ft_ssl md5 -p
Magic mirror on the wall, think I wanna smash them all?
Q�8e3bb0c45a8c064da4c1b2d5bd1bec04

expected behavior:

$ echo "Magic mirror on the wall, think I wanna smash them all?" | ./ft_ssl md5 -p
8e3bb0c45a8c064da4c1b2d5bd1bec04

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.