Skip to content

Commit

Permalink
Added another test case in order to increase code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitar Banchev authored and ccojocar committed Aug 30, 2024
1 parent a6dd589 commit a14ca4a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions testutils/g407_samples.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ import (
"fmt"
)
func encrypt(nonce []byte) {
block, _ := aes.NewCipher([]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
aesOFB := cipher.NewOFB(block, nonce)
var output = make([]byte, 16)
aesOFB.XORKeyStream(output, []byte("Very Cool thing!"))
fmt.Println(string(output))
}
func main() {
var nonce = []byte("ILoveMyNonceAlot")
encrypt(nonce)
}
`}, 1, gosec.NewConfig()},

{[]string{`package main
import (
"crypto/aes"
"crypto/cipher"
"fmt"
)
func main() {
block, _ := aes.NewCipher([]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
Expand Down

0 comments on commit a14ca4a

Please sign in to comment.