Skip to content

Instantly share code, notes, and snippets.

@solarfly73
Created August 15, 2017 16:46
Show Gist options
  • Save solarfly73/e8e28272076695ef2e028b0682174b7e to your computer and use it in GitHub Desktop.
Save solarfly73/e8e28272076695ef2e028b0682174b7e to your computer and use it in GitHub Desktop.
youmark pkcs8
func ConvertPrivateKeyToPKCS8(priv interface{}, v ...[]byte) ([]byte, error) {
if v == nil {
return convertPrivateKeyToPKCS8(priv)
}
password := string(v[0])
return convertPrivateKeyToPKCS8Encrypted(priv, []byte(password))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment