rewriting in go

This commit is contained in:
2025-08-11 23:10:30 +02:00
parent bea5baf026
commit 154f058971
23 changed files with 449 additions and 656 deletions

34
commands/bcrypt/bcrypt.go Normal file
View File

@@ -0,0 +1,34 @@
package bcrypt
import (
"context"
"flag"
"github.com/google/subcommands"
)
type (
MD5Cmd struct {
file string
round int
}
)
func (*MD5Cmd) Name() string { return "bcrypt" }
func (*MD5Cmd) Synopsis() string { return "" }
func (*MD5Cmd) Usage() string {
return `Usage: hash_utils bcrypt
Options:
`
}
func (p *MD5Cmd) SetFlags(f *flag.FlagSet) {
f.StringVar(&p.file, "file", "", "get the checksum of a file")
f.IntVar(&p.round, "round", 12, "number of iteration")
}
func (p *MD5Cmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {
return subcommands.ExitSuccess
}