MCPcopy Create free account
hub / github.com/DNAProject/DNA / PrintNotice

Function PrintNotice

cmd/common/notice.go:27–73  ·  view source on GitHub ↗

* common - print notice when user need to choose or enter something */

(name string)

Source from the content-addressed store, hash-verified

25
26/* common - print notice when user need to choose or enter something */
27func PrintNotice(name string) {
28 switch name {
29 case "key type":
30 fmt.Printf(`
31Select a signature algorithm from the following:
32
33 1 ECDSA
34 2 SM2
35 3 Ed25519
36
37[default is 1]: `)
38 break
39
40 case "curve":
41 fmt.Printf(`
42Select a curve from the following:
43
44 | NAME | KEY LENGTH (bits)
45 ---|-------|------------------
46 1 | P-224 | 224
47 2 | P-256 | 256
48 3 | P-384 | 384
49 4 | P-521 | 521
50
51This determines the length of the private key [default is 2]: `)
52 break
53
54 case "signature-scheme":
55 fmt.Printf(`
56Select a signature scheme from the following:
57
58 1 SHA224withECDSA
59 2 SHA256withECDSA
60 3 SHA384withECDSA
61 4 SHA512withECDSA
62 5 SHA3-224withECDSA
63 6 SHA3-256withECDSA
64 7 SHA3-384withECDSA
65 8 SHA3-512withECDSA
66 9 RIPEMD160withECDSA
67
68This can be changed later [default is 2]: `)
69 break
70
71 default:
72 }
73}

Callers 3

chooseKeyTypeFunction · 0.92
chooseSchemeFunction · 0.92
chooseCurveFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected