]> Cypherpunks repositories - gostls13.git/commit
crypto/des: test using the public API
authorqmuntal <quimmuntal@gmail.com>
Thu, 17 Aug 2023 13:30:58 +0000 (15:30 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 29 Aug 2023 16:49:56 +0000 (16:49 +0000)
commit2e644cce9db814a50fa185b583075bd927910057
tree84476a43f1924d0324b6c637b0ac29e085495de3
parent4e48e46791ba5d9699b0b07cf6c8ca6b05d59e76
crypto/des: test using the public API

Several of the tests in crypto/des were using the unexported
desCipher type and other unexported functions to test the package,
leaving desCipher.Encrypt and desCipher.Decrypt only partially tested.

This CL changes the tests to use the public API, except for
TestInitialPermute and TestFinalPermute, which are testing
implementation details on purpose.

Change-Id: I0bc13cea06b79b29425412b9bf36b997871518ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/520495
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/crypto/des/block.go
src/crypto/des/cipher.go
src/crypto/des/des_test.go
src/crypto/des/internal_test.go [new file with mode: 0644]