utils

package
v0.0.0-...-b6c8314 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GrubPBKDF2 *pbkdf2_arg

Functions

func CheckUsername

func CheckUsername(username string) (b bool)

帐号校验

func DoDetect

func DoDetect() ([]string, []string, error)

func GrubPBKDF2Crypto

func GrubPBKDF2Crypto(usr, passwd string) (string, error)

func InitGrubPBKDF2

func InitGrubPBKDF2() *pbkdf2_arg

func IsInSlice

func IsInSlice(element string, elements []string) (isIn bool)

func ToString

func ToString(v interface{}) string

Types

type ActionType

type ActionType int
const (
	// const MenuCryptoCfg = "../../etc/grub.d/42_uos_menu_crypto"
	MenuCryptoCfg            = "./42_uos_menu_crypto"
	Add           ActionType = iota + 1
	Delete
	Disable
	Enable
)

func (ActionType) WriteConfig

func (action ActionType) WriteConfig(usr string, chiperPasswd ...string) error

写入文件

Jump to

Keyboard shortcuts

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