mirror of
https://gogs.blitter.com/RLabs/cryptmt
synced 2024-08-14 19:26:42 +00:00
Added io.Reader/Writers to satisfy io.Copy() interface
Added cmd/main for CLI usage Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
ce6570ddcc
commit
41d01db0ab
2 changed files with 55 additions and 4 deletions
33
cmd/main.go
Normal file
33
cmd/main.go
Normal file
|
@ -0,0 +1,33 @@
|
|||
// WANDERER - a crypto doodle that appears to give adequate
|
||||
// protection to data in a stream cipher context (?)
|
||||
//
|
||||
// Properties visualized using https://github.com/circulosmeos/circle
|
||||
//
|
||||
// test command-line 'main' program
|
||||
package main
|
||||
|
||||
// TODOs:
|
||||
// -use a crypto rand (eg mtwist64) instead of go pkg rand?
|
||||
// -define s-box rotation/shuffle schema
|
||||
// -devise p-box schema
|
||||
// ...
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"blitter.com/go/cryptmt"
|
||||
)
|
||||
|
||||
var (
|
||||
k string
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&k, "k", "WARNING_DEFAULT_KEY", "Key (NOTE insecure specified on command line)")
|
||||
flag.Parse()
|
||||
|
||||
c := cryptmt.New(os.Stdin, os.Stdout, []byte(k))
|
||||
_, _ = io.Copy(c, c)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue