File: keytype_string.go

package info (click to toggle)
gokey 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: makefile: 11
file content (29 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Code generated by "stringer -type KeyType"; DO NOT EDIT.

package gokey

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[EC256-0]
	_ = x[EC384-1]
	_ = x[EC521-2]
	_ = x[RSA2048-3]
	_ = x[RSA4096-4]
	_ = x[X25519-5]
	_ = x[ED25519-6]
}

const _KeyType_name = "EC256EC384EC521RSA2048RSA4096X25519ED25519"

var _KeyType_index = [...]uint8{0, 5, 10, 15, 22, 29, 35, 42}

func (i KeyType) String() string {
	if i < 0 || i >= KeyType(len(_KeyType_index)-1) {
		return "KeyType(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _KeyType_name[_KeyType_index[i]:_KeyType_index[i+1]]
}