mirror of
https://gogs.blitter.com/RLabs/cryptmt
synced 2024-08-14 19:26:42 +00:00
41d01db0ab
Added cmd/main for CLI usage Signed-off-by: Russ Magee <rmagee@gmail.com>
33 lines
660 B
Go
33 lines
660 B
Go
// 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)
|
|
}
|