Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Sep 2, 2024
1 parent 11d799c commit f37326e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cipher/cascade/cascade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"golang.org/x/crypto/cast5"
"golang.org/x/crypto/twofish"
"github.com/deatil/go-cryptobin/cipher/serpent"
cryptobin_cipher "github.com/deatil/go-cryptobin/cipher"
cryptobin_mode "github.com/deatil/go-cryptobin/mode"
)

func fromHex(s string) []byte {
Expand Down Expand Up @@ -146,14 +146,14 @@ func Test_Check(t *testing.T) {
c, _ := NewCipher(c1, c2)

b := make([]byte, len(tt.plain))
cryptobin_cipher.
cryptobin_mode.
NewECBEncrypter(c).
CryptBlocks(b[:], tt.plain)
if !bytes.Equal(b[:], tt.cipher) {
t.Errorf("encrypt failed: got %x, want %x", b, tt.cipher)
}

cryptobin_cipher.
cryptobin_mode.
NewECBDecrypter(c).
CryptBlocks(b[:], tt.cipher)
if !bytes.Equal(b[:], tt.plain) {
Expand Down

0 comments on commit f37326e

Please sign in to comment.