password

package
v0.0.0-...-1733d6c Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package password provides utilities for generating MRTD passwords (MRZ,MRZi,CAN) used during BAC/PACE authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Password

type Password struct {
	PasswordType PasswordType
	Password     string
}

func NewPasswordCan

func NewPasswordCan(can string) *Password

func NewPasswordMrz

func NewPasswordMrz(mrzStr string) (pass *Password, err error)

func NewPasswordMrzi

func NewPasswordMrzi(documentNo string, dateOfBirth string, dateOfExpiry string) (pass *Password, err error)

func NewPasswordNil

func NewPasswordNil() *Password

'nil' password - used primarily by unit tests

func (*Password) GetKey

func (password *Password) GetKey() []byte

func (*Password) GetType

func (password *Password) GetType() byte

type PasswordType

type PasswordType int
const (
	PASSWORD_TYPE_NIL PasswordType = iota
	PASSWORD_TYPE_MRZi
	PASSWORD_TYPE_CAN
)

Jump to

Keyboard shortcuts

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