(_ context.Context, _ requestContext)
| 241 | } |
| 242 | |
| 243 | func handleRepoSupportedAlgorithms(_ context.Context, _ requestContext) (any, *apiError) { |
| 244 | res := &serverapi.SupportedAlgorithmsResponse{ |
| 245 | DefaultHashAlgorithm: hashing.DefaultAlgorithm, |
| 246 | SupportedHashAlgorithms: toAlgorithmInfo(hashing.SupportedAlgorithms(), neverDeprecated), |
| 247 | |
| 248 | DefaultEncryptionAlgorithm: encryption.DefaultAlgorithm, |
| 249 | SupportedEncryptionAlgorithms: toAlgorithmInfo(encryption.SupportedAlgorithms(false), neverDeprecated), |
| 250 | |
| 251 | DefaultECCAlgorithm: ecc.DefaultAlgorithm, |
| 252 | SupportedECCAlgorithms: toAlgorithmInfo(ecc.SupportedAlgorithms(), neverDeprecated), |
| 253 | |
| 254 | DefaultSplitterAlgorithm: splitter.DefaultAlgorithm, |
| 255 | SupportedSplitterAlgorithms: toAlgorithmInfo(splitter.SupportedAlgorithms(), neverDeprecated), |
| 256 | } |
| 257 | |
| 258 | for k := range compression.ByName { |
| 259 | res.SupportedCompressionAlgorithms = append(res.SupportedCompressionAlgorithms, serverapi.AlgorithmInfo{ |
| 260 | ID: string(k), |
| 261 | Deprecated: compression.IsDeprecated[k], |
| 262 | }) |
| 263 | } |
| 264 | |
| 265 | sortAlgorithms(res.SupportedHashAlgorithms) |
| 266 | sortAlgorithms(res.SupportedEncryptionAlgorithms) |
| 267 | sortAlgorithms(res.SupportedECCAlgorithms) |
| 268 | sortAlgorithms(res.SupportedCompressionAlgorithms) |
| 269 | sortAlgorithms(res.SupportedSplitterAlgorithms) |
| 270 | |
| 271 | return res, nil |
| 272 | } |
| 273 | |
| 274 | func neverDeprecated(string) bool { |
| 275 | return false |
nothing calls this directly
no test coverage detected