MCPcopy Index your code
hub / github.com/smallstep/cli / getContentEncryptionAlg

Function getContentEncryptionAlg

command/crypto/jwe/encrypt.go:295–314  ·  view source on GitHub ↗
(ctx *cli.Context, enc string)

Source from the content-addressed store, hash-verified

293}
294
295func getContentEncryptionAlg(ctx *cli.Context, enc string) (jose.ContentEncryption, error) {
296 switch enc {
297 case "":
298 return jose.A256GCM, nil
299 case "A128GCM":
300 return jose.A128GCM, nil
301 case "A192GCM":
302 return jose.A192GCM, nil
303 case "A256GCM":
304 return jose.A256GCM, nil
305 case "A128CBC-HS256":
306 return jose.A128CBC_HS256, nil
307 case "A192CBC-HS384":
308 return jose.A192CBC_HS384, nil
309 case "A256CBC-HS512":
310 return jose.A256CBC_HS512, nil
311 default:
312 return "", errs.InvalidFlagValue(ctx, "enc", enc, "")
313 }
314}
315
316func getRecipientAlg(ctx *cli.Context, alg string) (jose.KeyAlgorithm, error) {
317 switch alg {

Callers 1

encryptActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…