Skip to content

Commit

Permalink
Replace ioutil.ReadAll with io.ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
lubux committed Feb 28, 2024
1 parent 54e58ae commit 65ad1e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion openpgp/v2/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,10 @@ func TestEncryptWithAEAD(t *testing.T) {
if err != nil {
t.Fatal(err)
}
dec, err := ioutil.ReadAll(m.decrypted)
dec, err := io.ReadAll(m.decrypted)
if err != nil {
t.Fatal(err)
}

if !bytes.Equal(dec, []byte(message)) {
t.Error("decrypted does not match original")
Expand Down
5 changes: 4 additions & 1 deletion openpgp/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ func TestEncryptWithAEAD(t *testing.T) {
if err != nil {
t.Fatal(err)
}
dec, err := ioutil.ReadAll(m.decrypted)
dec, err := io.ReadAll(m.decrypted)
if err != nil {
t.Fatal(err)
}

if !bytes.Equal(dec, []byte(message)) {
t.Error("decrypted does not match original")
Expand Down

0 comments on commit 65ad1e4

Please sign in to comment.