From 71e2fd608ccc0e6e85833a70df253cf0cfae9607 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 18 Sep 2016 20:15:16 +0200 Subject: Add bcrypt_pbdkf --- main.go | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 7e26857..422eb4f 100644 --- a/main.go +++ b/main.go @@ -5,9 +5,6 @@ import ( "encoding/base64" "flag" "fmt" - "os" - - "golang.org/x/crypto/ed25519" ) var ( @@ -16,9 +13,10 @@ var ( ) const ( - verFailed = "signature verfication failed" - verOK = "Signature Verfied" - KeyNumLen = 8 + verFailed = "signature verfication failed" + verOK = "Signature Verfied" + KeyNumLen = 8 + DefaultRounds = 42 ) /* @@ -68,19 +66,3 @@ func main() { ms, _ := ss.Marshal() fmt.Println(string(ms)) } - -func Generate(pubFile, secFile, comment string, rounds int) error { - pub, sec, err := ed25519.GenerateKey(rand.Reader) - if err != nil { - return err - } - b64 := base64.NewEncoder(base64.StdEncoding, os.Stdout) - fmt.Println("pub", len(pub), pub) - b64.Write(pub) - fmt.Println("sec", len(sec), sec) - b64.Write(sec) - return nil -} - -func Sign() {} -func Verify() {} -- cgit v1.2.3