seclib

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

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 CHARS = fmt.Sprintf("%s%s%s", DIGITS, LETTERS, UPPERS)
View Source
var CHARS2 = fmt.Sprintf("%s%s%s%s", DIGITS, LETTERS, UPPERS, PUNC)
View Source
var WEAK_PASSWORDS []string = []string{}/* 129 elements not displayed */

Functions

func CleanCertificate

func CleanCertificate(cert string) string

func DecodePrivateKey

func DecodePrivateKey(keyString []byte) (*rsa.PrivateKey, error)

func GeneratePassword

func GeneratePassword(passwd string) (string, error)

func MeetComplxity

func MeetComplxity(passwd string) bool

func RandomPassword

func RandomPassword(width int) string

func RandomPassword2

func RandomPassword2(width int) string

Types

type PasswordStrength

type PasswordStrength struct {
	Digits     int
	Lowercases int
	Uppercases int
	Punctuats  int
	Invalid    []byte
}

func AnalyzePasswordStrenth

func AnalyzePasswordStrenth(passwd string) PasswordStrength

func (PasswordStrength) Len

func (ps PasswordStrength) Len() int

func (PasswordStrength) MeetComplexity

func (ps PasswordStrength) MeetComplexity() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL