Giter Club home page Giter Club logo

pwd-util's Introduction

pwd-util

I should point out that I AM NOT A CYBERSECURITY EXPERT !!! Use of this application is your responcibility and is given as is.

This is a work in progress project. Currently there is nothing except for a simple algorithm for generating random but meaningful strings. The plan is to make a utility for safe storage and generation of passwords.

Word generating algorithm (Not secure enough for passwords and it uses rand() lol)

The algorithm starts by picking a random number that doesn't exceed sum of all weights. Then, in alphabetical order, all weights of all characters are summed up untill the sum exceeds the random number. Assuming that rand() isnt biased to any value(s) we can controll the selection of a character by making it's weight larger compared to other weights.

You can imagine rand() choosing a random point on the line below and the probablity that point will belong to some character is defined by length of that character on the line:

a--b----------c--d- - - - z--

In this case the likelyhood of 'b' being chosen is far bigger then other characters. Here are a few raw examples:

  qbgkapo  rxgmclp  lbpqutk  nkyaaos  uoropyd
  zupbcfu  gpnypnz  ubjgufg  ganzyou  utzgqyl
  sccmayh  aqgwdyp  zctpppp  uzurtfy  mpqobdf

How to build this app (Linux, make, g++)

First of all download all files and have make and g++ installed. Then open forler with the files and type

$ make

$ indicates that you type it in terminal, no need to type that. After make builds succesfully you wil see main file in your folder. Check by:

$ ls
main main.cpp (...other files)

Usage

Run

$ ./main

The output can be controlled by [str-len] - length of your string, (default 16) [lines] - number of lines (1) [cols] - number of cols if you want to compact the output (1)

$ ./main [str-len] [lines] [cols]

Here is an example:

$ ./main 7 3 5

  qbgkapo  rxgmclp  lbpqutk  nkyaaos  uoropyd
  zupbcfu  gpnypnz  ubjgufg  ganzyou  utzgqyl
  sccmayh  aqgwdyp  zctpppp  uzurtfy  mpqobdf

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.