Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(privateKey, secret []byte) ([]byte, error)
- func DecryptBase64(privateKey string, secret string) (string, error)
- func Encrypt(publicKey, origData []byte) ([]byte, error)
- func EncryptBase64(publicKey string, message string) (string, error)
- func GenerateDSASSHKeypair() (string, string, error)
- func GeneratePassword(passwd string) (string, error)
- func GenerateRSASSHKeypair() (string, string, error)
- func GetPublicKeyScheme(pubkey ssh.PublicKey) string
- func InitTLSConfig(certFile, keyFile string) (*tls.Config, error)
- func MeetComplxity(passwd string) bool
- func RandomPassword2(width int) string
- func VerifyPassword(passwd string, hash string) error
- type PasswordStrength
Constants ¶
View Source
const ( DIGITS = "23456789" LETTERS = "abcdefghjkmnpqrstuvwxyz" UPPERS = "ABCDEFGHJKMNPRSTUVWXYZ" PUNC = "()~@#$%^&*-+={}[]:;<>,.?/" ALL_DIGITS = "0123456789" ALL_LETTERS = "abcdefghijklmnopqrstuvwxyz" ALL_UPPERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ALL_PUNC = "~`!@#$%^&*()-_=+[]{}|:';\",./<>?" )
Variables ¶
View Source
var CERT_SEP = []byte("-END CERTIFICATE-")
Functions ¶
func GenerateDSASSHKeypair ¶
func GeneratePassword ¶
func GenerateRSASSHKeypair ¶
func GetPublicKeyScheme ¶
func MeetComplxity ¶
func RandomPassword2 ¶
func VerifyPassword ¶
Types ¶
type PasswordStrength ¶
func AnalyzePasswordStrenth ¶
func AnalyzePasswordStrenth(passwd string) PasswordStrength
func (PasswordStrength) Len ¶
func (ps PasswordStrength) Len() int
func (PasswordStrength) MeetComplexity ¶
func (ps PasswordStrength) MeetComplexity() bool
Click to show internal directories.
Click to hide internal directories.