From 60caeaaecd8ad0b1f274da4816d97945e13d166b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 2 May 2015 15:42:41 +0200 Subject: [PATCH] Added travis build and README --- .travis.yml | 8 ++++++++ README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .travis.yml create mode 100644 README.md diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c582cee --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: go + +go: + - 1.3 + - 1.4 + - tip + +script: go test -v --bench=. ./... diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad6d3e7 --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# Luzifer / password + +This project is a rewrite of my former password generator written in Python. The intention is to provide a fast and secure way to generate one or more passwords using a CLI tool or a HTTP(s) API. + +## Usage + +### Via Web + +My service [pwd.knut.me](http://pwd.knut.me/) is powered by this API and will provide you with secure passwords. + +### Via CLI + +1. Download the compiled binary from GoBuilder.me and unzip the package +2. Generate your password: + + ```bash + # ./password get -h + NAME: + get - generate and return a secure random password + + USAGE: + command get [command options] [arguments...] + + OPTIONS: + --length, -l "20" length of the generated password + --special, -s use special characters in your password + + # ./password get + Vzupi4IaPbXmSQEX9A4e + ``` + +### Via API + +TBD + +## Benchmark / Test + +Tests and benchmark are run by Travis CI at every push to this repository: + +[![Build Status](https://travis-ci.org/Luzifer/password.svg)](https://travis-ci.org/Luzifer/password) + +```bash +# go test -bench . +PASS +BenchmarkGeneratePasswords8Char 20000 74875 ns/op +BenchmarkGeneratePasswords8CharSpecial 10000 108451 ns/op +BenchmarkGeneratePasswords16Char 10000 135059 ns/op +BenchmarkGeneratePasswords16CharSpecial 10000 142958 ns/op +BenchmarkGeneratePasswords32Char 5000 307994 ns/op +BenchmarkGeneratePasswords32CharSpecial 5000 284031 ns/op +BenchmarkGeneratePasswords128Char 300 6721034 ns/op +BenchmarkGeneratePasswords128CharSpecial 500 3244446 ns/op +ok github.com/Luzifer/password/lib 13.764s +```