Jump to content




Compress - Transform a folder structure into a single self-extracting file!



  • You cannot reply to this topic
47 replies to this topic

#41 Luca_S

  • Members
  • 407 posts
  • LocationGermany

Posted 02 January 2016 - 09:23 AM

http://www.computerc...-computercraft/

You could use this, it is really fast, you would just need a function to transform a password into a 32 Byte string. You could use sha256 and take the first 32 bytes.

Edit: Happy new year :D

Edited by Luca0208, 02 January 2016 - 09:25 AM.


#42 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 January 2016 - 09:40 AM

Well, that might actually be a good idea. I will condlsider it.

Edited by Creator, 02 January 2016 - 09:40 AM.


#43 Anavrins

  • Members
  • 775 posts

Posted 02 January 2016 - 07:40 PM

You could hash the password, take the string output of it and feed it into
function hashToKey(s)
local r = {}
s = tostring(s)
s = #s%2==1 and s.."0" or s
for b in s:gmatch("%x%x?") do
  r[#r+1] = tonumber(b, 16)
end
return r
end
Which outputs into the perfect key format for my Chacha code.
And in the end, the password, even the hash is not stored anywhere.
Although, you would need to prepend some fixed header to the data before encryption, to confirm correct decryption.

Edited by Anavrins, 02 January 2016 - 08:06 PM.


#44 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 January 2016 - 08:37 PM

I will rather not use a header since the code will error anyways if the dectlryption failed.

#45 Anavrins

  • Members
  • 775 posts

Posted 02 January 2016 - 09:06 PM

I'm going with the assumption that people won't only compress lua code.
Like paint images, they'll be correctly decrypted, but they will errors when you run them.

Edited by Anavrins, 02 January 2016 - 09:09 PM.


#46 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 January 2016 - 10:21 PM

What I will be decrypting is a lua program that decompresses itself, so there is no room for failure.

#47 Anavrins

  • Members
  • 775 posts

Posted 02 January 2016 - 10:26 PM

Oh oh oh, then that's all right :P
Sorry for misundertanding.

Edited by Anavrins, 02 January 2016 - 10:26 PM.


#48 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 January 2016 - 11:10 PM

Maybe I was no clear enough. Anyways, thanks for the help too.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users