FuzzDecrypt fuzzes Decrypt with hostile documents, seeded with the corpus and past crashers of the retired go-fuzz harness. Run it with go test -fuzz=FuzzDecrypt ./xmlenc
(f *testing.F)
| 136 | // |
| 137 | // go test -fuzz=FuzzDecrypt ./xmlenc |
| 138 | func FuzzDecrypt(f *testing.F) { |
| 139 | for _, seed := range covSeeds(f) { |
| 140 | f.Add(seed) |
| 141 | } |
| 142 | for _, bc := range []BlockCipher{AES128CBC, AES256GCM} { |
| 143 | e := OAEP() |
| 144 | e.BlockCipher = bc |
| 145 | f.Add(covTestKeyDocument(f, e)) |
| 146 | } |
| 147 | f.Fuzz(func(_ *testing.T, data []byte) { |
| 148 | _ = decryptForFuzzing(covFuzzKey(), data) |
| 149 | }) |
| 150 | } |
nothing calls this directly
no test coverage detected