I'll planed use AES128 with md5 for short messaging (16-64 bytes) with server. I know about MD5 use, it's bad idea, but I think MD5 the best hash solution for iot embedded processors. My messages will be pretty short. Hash will contain decrypted data + some constant "fingerprint" from firmware. I have question about using CBC mode + MD5. When I encrypt first 16 bytes message I got some results from AES and MD5, and then next 16bytes with same input data give me different AES and same MD5. How that fact reduce encryption reliability for AES? Or need use ECB mode?
I am trying to write a simple script to verify the HDFS and local filesystem checksums.
On HDFS i get -
[m@x01tbipapp3a ~]$ hadoop fs -checksum /user/m/file.txt/user/m/file.txt MD5-of-0MD5-of-512CRC32C **000002000000000000000000755ca25bd89d1a2d64990a68dedb5514**
On the Local File System, I get -
[m@x01tbipapp3a ~]$ cksum file.txt**3802590149 26276247** file.txt[m@x01tbipapp3a ~]$ md5sum file.txt**c1aae0db584d72402d5bcf5cbc29134c** file.txt
Now how do i compare them. I tried to convert the HDFS checksum from Hex to Decimal to see if it matches the chksum but it does not...
Is there a way to compare the 2 checksums using any algorithm?
At the time I noticed my solution was reinventing the wheel and since I didn't know guava's md5 hash implementation existed, I removed my code and used guava. Now I'm on other related project that uses same data from the first one but with one downside: I cannot use guava (again, I don't intend to discuss this decision, I want the explore its consequences and how I can argue technically about it). Since then I started to search for differences between these implementations.
At their github it's written:
Object.hashCode implementations tend to be very fast, but have weak collision prevention and no expectation of bit dispersion. For the many uses of hash functions beyond simple hash tables, however, Object.hashCode almost always falls short -- hence com.google.common.hash.
Well, besides of all benefits coming from using well documented tested world known libraries, and the downsides of writing my own implementation which is obviously more error prone, what are the main differences between native java, guava and apache commons codec solutions, only regarding md5 hash?
I mean, if they follow the same base algorithm, could I consider they always return the same hash for the same byte sequence, right? How does this relate to more/less collisions?
Running the MD5 implementation below returns a different result in macOS 10.15 than it does on 10.14
The NSData object should be the same (unsure the best way to check this - allocating to NSString is (null) in both scenarios. I have checked the length and both are the same)
unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5( self.bytes, (int)self.length, result ); return [NSString stringWithFormat: @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", result, result, result, result, result, result, result, result, result, result, result, result, result, result, result, result ];
EDIT:The NSData object is created with the below (obfuscated) code:
NSData *firstData = [self.firstString dataUsingEncoding:NSUTF8StringEncoding];NSMutableData *archivedData = [[NSKeyedArchiver archivedDataWithRootObject:secondString requiringSecureCoding:NO error:nil] mutableCopy];[archivedData appendData:firstData];return [archivedData MD5];
Edit:It actually looks like it's the NSData object that's different. The same string is passed into the code above, hard coded in a test app.There is still a difference between 10.14 and 10.15
10.1562706C69 73743030 D4010203 04050607 0A582476 65727369 6F6E5924 61726368 69766572 5424746F 7058246F 626A6563 74731200 0186A05F 100F4E53 4B657965 64417263 68697665 72D10809 54726F6F 748001A2 0B0C5524 6E756C6C 5F102C34 32373539 3930432D 42423235 36363143 2D434146 42424136 412D3031 46303242 42302D38 45364444 46303508 111A2429 3237494C 5153565C 00000000 00000101 00000000 0000000D 00000000 00000000 00000000 0000008B 47642437 2A752877 2B587852 684A7537 73342D39 39234625 305B413F 437A7434 4A722871 32245672 30406D58 50337251 71374644 372B522A 2D28462F 683E5F4B10.1462706C69 73743030 D4010203 04050609 0A582476 65727369 6F6E5824 6F626A65 63747359 24617263 68697665 72542474 6F701200 0186A0A2 07085524 6E756C6C 5F102C34 32373539 3930432D 42423235 36363143 2D434146 42424136 412D3031 46303242 42302D38 45364444 4630355F 100F4E53 4B657965 64417263 68697665 72D10B0C 54726F6F 74800108 111A232D 32373A40 6F818489 00000000 00000101 00000000 0000000D 00000000 00000000 00000000 0000008B 47642437 2A752877 2B587852 684A7537 73342D39 39234625 305B413F 437A7434 4A722871 32245672 30406D58 50337251 71374644 372B522A 2D28462F 683E5F4B
i have on my page phpbb3 and now I am also starting some advertisementing... So basicly want to have a form where i fill a username and password, then I want the script to hash and md5 the password (the same way as my phpbb3 does) and compare the password and username with table forum_users.... whatever I do I just cant make that works...
<?phpdefine('IN_PHPBB', true);include ("../Forum/common.php");include ("../Forum/includes/functions.php");$pass = "password";$hash = phpbb_hash($pass);echo $hash;?>
it doesnt do anything actually