Re: Risen 2 - Compression Tool
Quote:
Originally Posted by
JizzaBeez
The (de)compress and hash are separate. The last 32 bytes of the savedata is the SHA256 hash and the rest is the compressed data. So it doesn't matter if the compressed data's length changes or not because the hash is always appended to the end of the compressed data.
thanks I didn't know that ^.^
that will help me for future editors as well.
Re: Risen 2 - Compression Tool
Hey dude, great tool, i can decompress just fine, but when i try to compress the file i get an error saying -
"An error has occurred: the specified cryptographic algorithm is not supported on this platform"
any ideas?
*Edit* My friend tested it and it worked fine on Vista, I'm on Windows XP 32 bit. No idea why it won't work on my pc =/
Re: Risen 2 - Compression Tool
Quote:
Originally Posted by
x Revenge Inc x
Hey dude, great tool, i can decompress just fine, but when i try to compress the file i get an error saying -
"An error has occurred: the specified cryptographic algorithm is not supported on this platform"
any ideas?
*Edit* My friend tested it and it worked fine on Vista, I'm on Windows XP 32 bit. No idea why it won't work on my pc =/
Windows XP doesn't support something in the .Net Framework. There's nothing I can do about that, you have to work it out on your end.
Re: Risen 2 - Compression Tool
It seems only Windows XP SP3 and above supports the algorithm needed
Quote:
Prior to Windows XP Service Pack 3, there was no SHA2 functionality within Windows XP. With the release of Service Pack 3 some limited functionality was added to the crypto module rsaenh.dll. This includes the following SHA hashes: SHA-256, SHA-384, SHA-512. SHA-224 was not included.
There's an open source library written by BouncyCastle that has many implementations of algorithms, compressions, streams and other cryptographic classes that are not reliant on the core services of the .NET libraries - BouncyCastle DLL
Code:
Imports Org.BouncyCastle.Crypto.Digests
Sub DoSHA256()
'32 byte output hash buffer and 100 byte buffer to process
Dim Hash(&H20 - 1), Buffer(100 - 1) As Byte
For i As Byte = 0 To Buffer.Length - 1 'Fill buffer with junk
Buffer(i) = i
Next
Dim SHA As New Sha256Digest() 'Init SHA2
SHA.BlockUpdate(Buffer, 0, Buffer.Length) 'Process junk buffer
SHA.DoFinal(Hash, 0) 'Finalize crypto, copy resulting hash to hash buffer (returns an int aswell, always 0x20)
End Sub
Re: Risen 2 - Compression Tool
Thanks for the help guys, been meaning to upgrade to windows 7 but never got around to it lol, cheers again.
Re: Risen 2 - Compression Tool
Quote:
Originally Posted by
feudalnate
It seems only Windows XP SP3 and above supports the algorithm needed
There's an
open source library written by BouncyCastle that has many implementations of algorithms, compressions, streams and other cryptographic classes that are not reliant on the core services of the .NET libraries -
BouncyCastle DLL
Code:
Imports Org.BouncyCastle.Crypto.Digests
Sub DoSHA256()
'32 byte output hash buffer and 100 byte buffer to process
Dim Hash(&H20 - 1), Buffer(100 - 1) As Byte
For i As Byte = 0 To Buffer.Length - 1 'Fill buffer with junk
Buffer(i) = i
Next
Dim SHA As New Sha256Digest() 'Init SHA2
SHA.BlockUpdate(Buffer, 0, Buffer.Length) 'Process junk buffer
SHA.DoFinal(Hash, 0) 'Finalize crypto, copy resulting hash to hash buffer (returns an int aswell, always 0x20)
End Sub
Thanks for the info, I'll definitely give this a look.
Re: Risen 2 - Compression Tool
Re: Risen 2 - Compression Tool
Can't download this. Site say's I "Don't have permission to access this page" when I click the download button. Why don't it work for me? Fist time having a problem with this.
Edit
Spammed the download button, fixed it's self. Thanks for this.