Skip to content

Commit

Permalink
Hash generator
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirAgassi committed Dec 7, 2024
1 parent b20d936 commit 118a991
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions backend/scripts/generate_password_hash.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package main

import (
"fmt"
"golang.org/x/crypto/bcrypt"
"log"
)

func main() {
passwords := []string{"admin123", "startup123", "investor123"}

for _, password := range passwords {
hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
if err != nil {
log.Fatalf("failed to hash password: %v", err)
}

fmt.Printf("Password: %s\nHash: %s\n\n", password, string(hash))
}
}

0 comments on commit 118a991

Please sign in to comment.