testing

package
v0.0.0-...-8b70b2c Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestTokens = []TestToken{
	{"6782a7960cf0", "9a781c53532db8eb0c51ed87188cae98", []string{
		"jhvhgtetkdektuiucfgijuitkjjtdngt",
		"ffhdggktgrknbdiljhrvntvecgjidbcg",
		"ugecurgeghjlhheejifherejlrrkhhcf",
		"vcgreechrrkhfnrrltjnrbvdjjtrujlf",
		"gcnvtdhlrvvektrnhlunlhthitughrlg",
	},
	},
	{"8e76172284d4", "4cf039957d01a7a11ce59b6c10d27d50", []string{
		"iruikbviungfulfgjldibvjecgfgfvdf",
		"reeblctrdjutvnkhhtiunltignncibeb",
		"lvntfdcfkhujgnvrklkvcknfvcgvtnic",
		"chugnnetdbndbrlfuhbcvgujffbuehtk",
		"ucblkhnkktgjncvfdvuijehchgbljbdh",
	},
	},
	{"34af90f2ab88", "57724f2129d41cfe110da556fc680340", []string{
		"erhlblrbrlrbndlgknrurftkkbldbjtd",
		"fktetgbfkivhkvickdihgherejhlhfvn",
		"nutllbukbbdggdcdnherhlikctukcgic",
		"deeblibundeuhrcfkcvenjrhrukdnflf",
		"triugfrjuknvtlrhcrbuggkgugkdbijr",
	},
	},
	{"1de0dc832585", "3513c74392d6c8a384e071d8a1982d6d", []string{
		"gjedegnuicnhtejkkfgfjchtcefjjebv",
		"tejkntgruuttbrfnrvhkkdbbdrvlrktn",
		"ctbvhiuhhddftcjnjneebbjvnjrflull",
		"bhilhcilfthlvkfkuhiihtfrhnjvvggr",
		"jrlthhftjigjvbkrrljulcchrrjtchkh",
	},
	},
	{"4cb46b6cd4d2", "22fc59b26e9f58de45531789cc5318ed", []string{
		"rvtecndjgnrgfudlkvnregvbcufkrrkj",
		"chgegnirtlrdcvglturbnfrefkehefie",
		"hlfgrntggjitdkvrlehgfiunnuhibbir",
		"ddkteufutjbighkbtiebgkifeujbicvt",
		"fvbnckndilfrujviejhjbjjedjjrnvcb",
	},
	},
}

TestTokens These values were generated for testing using https://github.com/Yubico/yubico-c

Functions

func MapDbFromTestTokens

func MapDbFromTestTokens() *yubidb.MapDb

Types

type TestToken

type TestToken struct {
	// Pub yubikey id and public key
	Pub string
	// Secret yubikey OTP secret key
	Secret string
	// OTPs (without pub leader) generated from pub and Secret with incrementing session counters beginning at 1
	OTPs []string
}

TestToken is a single user with a few OTPs

func (TestToken) Token

func (t TestToken) Token(i int) string

Token returns a concatonated public key and OTP representing a YubiKey token (as if the user pressed the device)

Jump to

Keyboard shortcuts

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