md5

Bash - Compare 2 lists of files with their md5 check sums

坚强是说给别人听的谎言 提交于 2019-12-10 23:49:16
问题 I have 2 lists with files with their md5sum checks. The lists have different paths even that the files are the same. I want to check the md5 sums of each file. We are talking for thousands of files and that's why I need script to show me only the differences. The first list is the vanilla and the second is the current state of the files. I want to find which of the files are changed/different than the original. To do that I want to compare the 2 lists. On every line there is md5 sum and file

algorithm to convert md5 (or maybe another hashing method?) to integer where it is possible to set possible resulting integer ranges (eg: 1-10000)?

五迷三道 提交于 2019-12-10 23:15:45
问题 the topic pretty much describes what we would like to accomplish. a) start with a possible range of integers, for example, 1 to 10000. b) take any md5 hash, run it thru this algo. c) result that pops out will be an integer between 1 to 10000. we are open to using another hashing method too. the flow would ideally look like this: string -> md5(string) -> algo(md5(string),range) -> resulting integer within range is something like this possible? final note: the range will always start with 1. if

How to get hex-encoded md5 hash in Go

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 20:23:29
问题 I'm trying to get the md5 hash of a file in Go, like thus: running_hash := md5.New(); // type hash.Hash running_hash.Write(data); // data is []byte sum := running_hash.Sum(); // []uint8 according to the compiler But when I try to get the string of the hash's 'sum' (http://golang.org/pkg/hash/), via sumstring := string(sum); // returns 'Ӿ��]앿��N��' or similar when the hash is supposed to be d3be9e835dec95bfbef34ebe1fbf03da . I get the same sort of nonsense, only with different characters, when

Client Side MD5 Hash with Time Salt

半腔热情 提交于 2019-12-10 17:14:32
问题 I want to salt a hashed username and password (submitted via http POST) in JS on the client-side with a higher-order time value (< 1 minute resolution) to avoid sending the username and password hash as a constant value that could be used for a log-in attempt via POST fabrication by an unauthorized user (i.e. a sniffer). This will impose a short expiry on the usefulness of the passed hash. If they inspect the JS and see that it uses this time salt, how much easier will it make the job of

Difference between BINARY(16) and CHAR(32) when storing MD5 in database

独自空忆成欢 提交于 2019-12-10 16:23:03
问题 Based on various recommendations such as What data type to use for hashed password field and what length?, I could store md5 as either CHAR(32) or BINARY(16). But when I do so using BINARY(16), the stored value is identical to the first 16 characters of the CHAR(32) stored results as well as the first 16 characters of the SELECT MD5() results. What are the significance of the later 16 characters, and is their lack of presence in the binary column resulting in lost data? CREATE TABLE test (id

iOS 7.1 CommonCrypto library complains: Implicit conversion loses integer precision: 'NSUInteger' (unsigned long) to CC_LONG (unsigned int)

蓝咒 提交于 2019-12-10 16:16:35
问题 I get the above error (in title) whilst doing a MD5 from file.. I can usually cope with these type of 32->64bit conversion issues..but in this case, I do not know what I should do as CC_MD5 is part of CommonCrypto->CommonDigest , a library that ships with iOS7.1. I am assuming [inputData length] is returning NSUInteger and therein lies the issue, however can I simply cast down from UL to UI? I will possibly lose precision if the file is large. Why would a library that Apple ships with require

use python to create compatible ldap password (md5crypt) on windows

半世苍凉 提交于 2019-12-10 16:05:37
问题 Do you know how to create a ldap compatible password (preferred md5crypt) via python on Windows I used to write something like this in Linux but the crypt module is not present on Windows char_set = string.ascii_uppercase + string.digits salt = ''.join(random.sample(char_set,8)) salt = '$1$' + salt + '$' pwd = "{CRYPT}" + crypt.crypt(str(old_password),salt) 回答1: The Passlib python library contains cross-platform implementations of all the crypt(3) algorithms. In particular, it contains ldap

wkhtmltopdf generates a different checksum on every run

喜欢而已 提交于 2019-12-10 15:41:40
问题 I'm trying to verify that the content generated from wkhtmltopdf is the same from run to run, however every time I run wkhtmltopdf I get a different hash / checksum value against the same page. We are talking something real basic like using an html page of: <html> <body> <p> This is some text</p> </body </html> I get a different md5 or sha256 hash every time I run wkhtmltopdf using an amazing line of: ./wkhtmltopdf example.html ~/Documents/a.pdf And using a python hasher of: def shasum

fast md5sum on millions of strings in bash/ubuntu

吃可爱长大的小学妹 提交于 2019-12-10 15:41:00
问题 I need the MD5 sums of 3 million strings or so in a bash script on ubuntu. 3 million strings -> 3 million MD5 hashes. The trivial implementation takes about 0.005sec per string. That's over 4 hours. What faster alternatives exist? Is there a way to pump groups of strings into md5sum? #time md5sum running 100 times on short strings #each iteration is ~0.494s/100 = 0.005s time (for i in {0..99}; do md5sum <(echo $i); done) > /dev/null real 0m0.494s user 0m0.120s sys 0m0.356s A good solution

Use a combination of SHA1+MD5

送分小仙女□ 提交于 2019-12-10 15:22:29
问题 I'm trying use a secure way to create checksum for files (Larger than 10GB !). SHA256 is secure enough for me but this algorithm is so process expensive and it is not suitable. Well I know that both SHA1 and MD5 checksums are insecure through the collisions. So I just think the fastest and the safest way is combining MD5 with SHA1 like : SHA1+MD5 and I don't think there is way to get file (Collision) with the same MD5 and SHA1 both at a same time . So is combining SHA1+MD5 secure enough for