473,378 Members | 1,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

sha1,256,512 on files

Hi !

I have a problem in Windows.
I need to get the filelist in HDD-s, with sha-N value for every file (to
see what changed in the past).

1.
I see that Python supports the sha-1. But I need to make sha value in
big files to (swap file, iso-s, etc.). Possible that file size more than
2 GB, so I cannot read as string...
How to get the sha value of a file ?
If python not supports that, please give me a link with freeware
command line utility that can do it,and can pass to python.

2.
How to generate sha-256, or sha-512 values ?

Thanx for every help: dd

Nov 30 '05 #1
1 1688
"du*******@mailpont.hu" <du*******@mailpont.hu> writes:
I see that Python supports the sha-1. But I need to make sha value in
big files to (swap file, iso-s, etc.). Possible that file size more
than 2 GB, so I cannot read as string...
How to get the sha value of a file ?
Use the sha.update method. Something like:
ctx = sha.new()
while True:
x = f.read(16384)
if not x: break
ctx.update(x)
hash = ctx.digest()
How to generate sha-256, or sha-512 values ?


There are some modules around for this. Unless you're trying to
interoperate with something that needs them, or have some other reason
to want them, I wouldn't bother.
Nov 30 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: greg | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This is a PGP-signed copy of the checksums for PostgreSQL version 7.4. The latest copy of the checksums for this and other versions, as well...
6
by: Chang | last post by:
How to get SHA1 or MD5 of a big file (+5MB - 20GB) as I can't read 20GB into memory. -- Chang.
5
by: Michael H | last post by:
Hi all, I guess I don't fully understand how a SHA1 hash value is calculated in C# / .NET for a large file... I'm trying to calculate SHA1 values for large files that are much larger than my...
0
by: Dil via .NET 247 | last post by:
Fresher to .NET Aiming to produce a resulting hash of length 24 CHARACTERS, using MD5 or SHA1 Algorithms. According to the Class Libraries, the hash size for the SHA1 algorithm is 160 bits, and...
3
by: DurumDara | last post by:
Hi ! I need to speedup my MD5/SHA1 calculator app that working on filesystem's files. I use the Python standard modules, but I think that it can be faster if I use C, or other module for it. ...
0
by: VAISH | last post by:
Hi I am using C# (.NET) to do the following I am trying to canonicalize the xml and signing the xml using sha1. Please read the scenario below I have form with few fields, when I click save...
8
by: sathyashrayan | last post by:
Dear group, For a log-in page I have created a mysql db and user registers with a user name and password. The password field is encrypted with $passwd = sha1($_REQUEST); I insert the...
2
by: amygdala | last post by:
Hi, Does anybody now of a custom crypt function that implements sha1? The thing I like about crypt is that I don't have to worry about (re)generating salt when querying the database. Or are...
7
by: php.developer2007 | last post by:
I want to know to decode sha1 encoded url into normal url. Example www.example.com/<sha1 code>/index1.htm I want this to www.example.com/index1.htm
6
by: LaundroMat | last post by:
Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.