forked from mirror/zip
Add encryption method in test
This commit is contained in:
parent
166e1a9aa1
commit
0c390aad59
|
@ -1,3 +1,6 @@
|
||||||
|
This fork add support for Standard Zip Encryption.
|
||||||
|
https://github.com/yeka/zip
|
||||||
|
|
||||||
This is a fork of the Go archive/zip package to add support
|
This is a fork of the Go archive/zip package to add support
|
||||||
for reading/writing password protected .zip files.
|
for reading/writing password protected .zip files.
|
||||||
Only supports Winzip's AES extension: http://www.winzip.com/aes_info.htm.
|
Only supports Winzip's AES extension: http://www.winzip.com/aes_info.htm.
|
||||||
|
|
|
@ -175,7 +175,7 @@ func TestPasswordWriteSimple(t *testing.T) {
|
||||||
contents := []byte("Hello World")
|
contents := []byte("Hello World")
|
||||||
conLen := len(contents)
|
conLen := len(contents)
|
||||||
|
|
||||||
for _, enc := range []EncryptionMethod{AES128Encryption, AES192Encryption, AES256Encryption} {
|
for _, enc := range []EncryptionMethod{ZipStandardEncryption, AES128Encryption, AES192Encryption, AES256Encryption} {
|
||||||
raw := new(bytes.Buffer)
|
raw := new(bytes.Buffer)
|
||||||
zipw := NewWriter(raw)
|
zipw := NewWriter(raw)
|
||||||
w, err := zipw.Encrypt("hello.txt", "golang", enc)
|
w, err := zipw.Encrypt("hello.txt", "golang", enc)
|
||||||
|
|
Loading…
Reference in New Issue