Created
September 1, 2020 14:56
-
-
Save jon-stewart/0a8fc3877156592a8a9afd1f38a58e9d to your computer and use it in GitHub Desktop.
Generate Harbor Password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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