Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zipcryt, aes256, etc.. are not working on 7z.mod #11

Open
BirmLarm opened this issue Jul 21, 2023 · 12 comments
Open

Zipcryt, aes256, etc.. are not working on 7z.mod #11

BirmLarm opened this issue Jul 21, 2023 · 12 comments

Comments

@BirmLarm
Copy link

Hello. Can you please fix the issue... when I'm creating a 7z file and adding a password to it, the output file is not an encrypted 7z file. The "Encrypted Method" is not working on 7z.mod but in zip.mod, zipcrypt is working well except for the aes256.

@BirmLarm
Copy link
Author

And also how to add a folder, sir? with the modified date of the folder?
I added a folder in my archive file but the date is 1980 instead of the current date of the folder. :"(

image

@BirmLarm
Copy link
Author

and also i already tried the filetime but it didnt work.

local IN:stream=writestream ("NewDateForFolder.txt")
if IN then IN.close()
local getftime:long=filetime ("NewDateForFolder.txt")

archy.AddEntry("", "My Pictures", 0, getftime, EArchiveFileType.Dir)

@GWRon
Copy link
Contributor

GWRon commented Jul 21, 2023 via email

@BirmLarm
Copy link
Author

same process in the archive samples, sir. :)

@BirmLarm
Copy link
Author

SuperStrict

Framework Archive.Zip
Import brl.standardio

Local wa:TWriteArchive = New TWriteArchive
wa.SetFormat(EArchiveFormat.ZIP)
wa.SetCompressionLevel(9)

wa.Open("data.zip")

wa.AddEntry("testdata.txt", "files/testdata.txt")
wa.AddEntry("테스트_데이터.txt", "files/테스트_데이터.txt")
wa.AddEntry("", "empty", 0, 0, EArchiveFileType.Dir)

wa.Close()

Local entry:TArchiveEntry = New TArchiveEntry

Local ra:TReadArchive = New TReadArchive
ra.SetFormat(EArchiveFormat.ZIP)
ra.Open("data.zip")

While ra.ReadNextHeader(entry) = ARCHIVE_OK
Print "File : " + entry.Pathname()
Print "Size : " + entry.Size()
Print "Type : " + entry.FileType().ToString()
Local s:String = LoadText(ra.DataStream())
Print "String size : " + s.length
Print "First n chars : " + s[0..17]
Print
Wend

ra.Free()

@BirmLarm
Copy link
Author

:)))))))))))))))))))

image

@GWRon
Copy link
Contributor

GWRon commented Jul 21, 2023

Regarding modified time: the issue is that the current code only sets the modified time for files, not directories.
Will push a PR for it.

Local nowTime:SDatetime = New SDatetime(2023, 7, 21, 11, 23, 0)
wa.AddEntry("", "empty", 0, nowTime.ToEpochSecs(), EArchiveFileType.Dir)

results then here in:
image
(as it is using UTC)

Using my local time:

Local nowTime:SDatetime = New SDatetime(2023, 7, 21, 11, 23, 0, 0, False)
wa.AddEntry("", "empty", 0, nowTime.ToEpochSecs(), EArchiveFileType.Dir)

results then in
image

@GWRon
Copy link
Contributor

GWRon commented Jul 21, 2023

zip with AES256: more details can be found in the already existing issue here: #1

@woollybah
Copy link
Member

libarchive doesn't appear to support 7zip encryption yet.

@BirmLarm
Copy link
Author

oh i thought it was already updated 17 hours ago... and i tried it... and yep! still the same.

image

@BirmLarm
Copy link
Author

libarchive doesn't appear to support 7zip encryption yet.

I can wait you to update it, sir . ^-^ . Thank you for keep polishing your Blitzmax. God bless u always.

@GWRon
Copy link
Contributor

GWRon commented Jul 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants