{"record":{"id":"e3191853f2f22f8a","repo":"getsops/sops","slug":"input-string-s-does-not-match-sops-data-format","errorCode":null,"errorMessage":"Input string %s does not match sops' data format","messagePattern":"Input string (.+?) does not match sops' data format","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"aes/cipher.go","lineNumber":60,"sourceCode":"type Cipher struct {\n\t// stash is a map that stores IVs for reuse, so that the ciphertext doesn't change when decrypting and reencrypting\n\t// the same values.\n\tstash map[stashKey][]byte\n}\n\n// NewCipher is the constructor for a new Cipher object\nfunc NewCipher() Cipher {\n\treturn Cipher{\n\t\tstash: make(map[stashKey][]byte),\n\t}\n}\n\nvar encre = regexp.MustCompile(`^ENC\\[AES256_GCM,data:(.+),iv:(.+),tag:(.+),type:(.+)\\]`)\n\nfunc parse(value string) (*encryptedValue, error) {\n\tmatches := encre.FindStringSubmatch(value)\n\tif matches == nil {\n\t\treturn nil, fmt.Errorf(\"Input string %s does not match sops' data format\", value)\n\t}\n\tdata, err := base64.StdEncoding.DecodeString(matches[1])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error base64-decoding data: %s\", err)\n\t}\n\tiv, err := base64.StdEncoding.DecodeString(matches[2])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error base64-decoding iv: %s\", err)\n\t}\n\ttag, err := base64.StdEncoding.DecodeString(matches[3])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Error base64-decoding tag: %s\", err)\n\t}\n\tdatatype := string(matches[4])\n\n\treturn &encryptedValue{data, iv, tag, datatype}, nil\n}\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/aes/cipher.go#L42-L78","documentation":"Error \"Input string %s does not match sops' data format\" thrown in getsops/sops.","triggerScenarios":"Thrown at aes/cipher.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}