Skip to content

Instantly share code, notes, and snippets.

@jon-stewart
Created September 1, 2020 14:56
Show Gist options
  • Save jon-stewart/0a8fc3877156592a8a9afd1f38a58e9d to your computer and use it in GitHub Desktop.
Save jon-stewart/0a8fc3877156592a8a9afd1f38a58e9d to your computer and use it in GitHub Desktop.
Generate Harbor Password
package main
import (
"fmt"
"crypto/sha256"
"golang.org/x/crypto/pbkdf2"
)
func main() {
str := fmt.Sprintf("%x", pbkdf2.Key([]byte("mypassword"), []byte(""), 4096, 16, sha256.New))
fmt.Println(str)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment