Stefan Claas wrote: > Stefan Claas wrote: [...]
> Here's a little Go program, wich does this without the above commands, > so that it can be used on Windows without OpenSSL: > > package main > > import ( > "crypto/sha256" > "bufio" > "os" > "fmt" > "encoding/base64" > > "ekyu.moe/base91" > ) > > func main(){ > scanner := bufio.NewScanner(os.Stdin) > scanner.Scan() // use `for scanner.Scan()` to keep reading > src := scanner.Text() > hash := sha256.Sum256([]byte(src)) > fmt.Println(base91.EncodeToString([]byte(hash[:]))) > fmt.Println(base64.StdEncoding.EncodeToString(hash[:])) > } Forgot to mention, issue a 'go get -u ekyu.moe/base91' prior compiling. Regards Stefan -- my 'hidden' service gopherhole: gopher://iria2xobffovwr6h.onion _______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users