+/*
+balloon -- Balloon password hashing function
+Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as
+the Free Software Foundation, version 3 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this program. If not, see
+<http://www.gnu.org/licenses/>.
+*/
+
package main
import (
"flag"
"fmt"
"io"
+ "os"
"go.cypherpunks.ru/balloon"
)
p := flag.Int("p", 4, "Number of threads")
saltHex := flag.String("salt", "", "Salt, hexadecimal, optional")
passwd := flag.String("passwd", "", "Password")
+ flag.Usage = func() {
+ fmt.Fprintf(os.Stderr, "balloon -- Strengthen password with Balloon+SHA512\n\n")
+ flag.PrintDefaults()
+ }
flag.Parse()
var salt []byte
var err error