SupportedAlgorithms returns the names of the supported encryption methods.
(includeDeprecated bool)
| 57 | // SupportedAlgorithms returns the names of the supported encryption |
| 58 | // methods. |
| 59 | func SupportedAlgorithms(includeDeprecated bool) []string { |
| 60 | var result []string |
| 61 | |
| 62 | for k, e := range encryptors { |
| 63 | if e.deprecated && !includeDeprecated { |
| 64 | continue |
| 65 | } |
| 66 | |
| 67 | result = append(result, k) |
| 68 | } |
| 69 | |
| 70 | sort.Strings(result) |
| 71 | |
| 72 | return result |
| 73 | } |
| 74 | |
| 75 | // Register registers new encryption algorithm. |
| 76 | func Register(name, description string, deprecated bool, newEncryptor EncryptorFactory) { |
no outgoing calls