tobeyt23 Posted July 21, 2010 Share Posted July 21, 2010 Ok so I was asked to use this to encrypt my data: (first encoding) HashAlhorithm: SHA512 Passphrase: somepassphrase Saltvalue: somesaltvalue PasswordIterations: 42 Initvector: someinitvector (second encoding) HashAlhorithm: SHA256 Passphrase: somepassphrase2 Saltvalue: somesaltvalue2 PasswordIterations: 25 Initvector: someinitvector2 How would I do this??? Link to comment https://forums.phpfreaks.com/topic/208423-encryption/ Share on other sites More sharing options...
Mchl Posted July 21, 2010 Share Posted July 21, 2010 1. It's not encryption, it's hashing 2. hash Link to comment https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089124 Share on other sites More sharing options...
tobeyt23 Posted July 21, 2010 Author Share Posted July 21, 2010 This is what I have but said it was incorrect: hash('sha256', PASSPHRASE2 . SALT2. hash('sha512', PASSPHRASE1 . SALT1 . $data)); Link to comment https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089128 Share on other sites More sharing options...
tobeyt23 Posted July 21, 2010 Author Share Posted July 21, 2010 Okay I have this but still don't know how to use the InitVectorBytes: $iteration1 = '42'; $iteration2 = '25'; while(--$iteration1): $data = hash('sha512', $data . SALT1. PASSPHRASE1); endwhile; while(--$iteration2): $data = hash('sha256', $data . SALT2. PASSPHRASE2); endwhile; return $data; Link to comment https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089138 Share on other sites More sharing options...
Mchl Posted July 21, 2010 Share Posted July 21, 2010 May I ask what's the point of this? Hashing the hash 41 times doesn't make it any more hashed. Link to comment https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089148 Share on other sites More sharing options...
tobeyt23 Posted July 21, 2010 Author Share Posted July 21, 2010 that is the way i was asked to do it, not sure. Link to comment https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.