<commit_before><commit_msg>adding main package<commit_after>/*
This package returns the first n characters of the sha1 digest
of a string, provided by a commandline flag
The resulting string may be used as a reversible password.
*/

package main

import (
	"crypto/sha1"
	"flag"
	"fmt"
	"io"
)

func main() {

	// command-line flags
	username := flag.String("username", "randomize_me", "Seed string")
	shaLength := flag.Int("len", 6, "Password length")

	flag.Parse()

	h := sha1.New()
	io.WriteString(h, *username)

	sha := h.Sum(nil)
	len := *shaLength / 2
	c := sha[:len]
	fmt.Println("The password is: \n")
	fmt.Printf("%x\n\n", c)
}
{'fraction_non_alphanumeric': 0.152276295133438, 'fraction_numerical': 0.007849293563579277, 'mean_word_length': 4.104, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5670187', 'n_tokens_mistral': 232, 'n_tokens_neox': 225, 'n_words': 71}