diff --git a/encryption/encryption.go b/encryption/encryption.go index ef6f76f..c263f97 100644 --- a/encryption/encryption.go +++ b/encryption/encryption.go @@ -50,13 +50,13 @@ func Decrypt(data *[]byte, password string) ([]byte, error) { } metadata := (*data)[0] - *data = (*data)[MetadataLength:] - if metadata == 0 { // No password was used return *data, nil } + *data = (*data)[MetadataLength:] + if password == "" { return nil, errors.New("password is required") } diff --git a/test/zip/compressed.bin b/test/zip/compressed.bin deleted file mode 100644 index 1be5dba..0000000 Binary files a/test/zip/compressed.bin and /dev/null differ