* common - print notice when user need to choose or enter something */
(name string)
| 25 | |
| 26 | /* common - print notice when user need to choose or enter something */ |
| 27 | func PrintNotice(name string) { |
| 28 | switch name { |
| 29 | case "key type": |
| 30 | fmt.Printf(` |
| 31 | Select 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(` |
| 42 | Select 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 | |
| 51 | This determines the length of the private key [default is 2]: `) |
| 52 | break |
| 53 | |
| 54 | case "signature-scheme": |
| 55 | fmt.Printf(` |
| 56 | Select 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 | |
| 68 | This can be changed later [default is 2]: `) |
| 69 | break |
| 70 | |
| 71 | default: |
| 72 | } |
| 73 | } |
no outgoing calls
no test coverage detected