Category "hash"

Is there a way to hash a command output without the use of a temp file?

In command-prompt you can see the md5 or other hash of a file using certutil -hashfile <filepath> <hash algorithm>. This was the only option I can f

How was the initial hash value (H(0)) of SHA-224 obtained?

RFC 6234: US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF) explains only how the initial hash values (H(0)) for SHA-256, SHA-384, and SHA-512 were ob

Unable to match results of php hash_hmac() and coldfusion hmac()

I am working on encrypting a URL and converting a working script from PHP to ColdFusion. I have completed 95% of the work but I am stuck at this point after try

Java - Hashing with HmacSHA384 and encoding with HexDigest

I'm trying to replicate the same signature outcome as the Python code in Java. Python Code Example: secret = "1234abcd".encode() encoded_payload = json.dumps(pa

VB.NET Core 6, Hashing password in (Win form) using SHA512 - Visual Basic

I am trying to build an application where security and encryption are a high concern. I am using Visual Studio 2022 and VB.NET 6.0 (I searched for 3 days now an

How to read HASH(0x1fcb970) using perl?

I'm really lost with this, how can I read this response form an API HASH(0x1fcb970) using perl. my @info= $connection->fetchrow(); When I try to print the d

Order images based on similarity

I have a lot of images in a folder that I would like to put in order based on how similar they are. The images are histological slides from a tissue microarray

Hashing a file in Python

I want python to read to the EOF so I can get an appropriate hash, whether it is sha1 or md5. Please help. Here is what I have so far: import hashlib inputFil

PHP soap wrong digest hash

I'm trying to send a SOAP message from PHP to a server, and I'm stuck at generating a SHA256 hash of the data being sent. Here is an example request provided by

How to hash a big file without having to manually process chunks of data?

When we want to get the hash of a big file in Python, with Python's hashlib, we can process chunks of data of size 1024 bytes like this: import hashlib m = has

Compare md5 hashes of two files in python

I want to compare hashes of two files. But no matter if files are different or not, even with different hashes comparison results True Here is the code: imp

Why Double Hashing has bad cache performance?

The Wikipedia article on Open Addressing says: linear probing has the best cache performance but is most sensitive to clustering, while double hashing has poor

How to export an associative array (hash) in bash?

Related, but not a duplicate of: How to define hash tables in Bash? I can define and use a bash hash, but I am unable to export it, even with the -x flag. For

Fast hash function with collision possibility near SHA-1

I'm using SHA-1 to detect duplicates in a program handling files. It is not required to be cryptographic strong and may be reversible. I found this list of fast

How to replicate ASP Classic SHA512 Hash function in PHP

I'm currently rewriting an asp classic site in PHP, everything so far has been simple until I reached the password hashing function. In PHP I've used hash_hmac

Expected pair of collisions in two choice hashing

In two choice hashing(with chaining), two random hash functions h1, h2 are selected to hash n keys to m positions. The process goes like this: Insert all n key

Comparing MD5 hashes between XLSX files with identical content

We have an internal web application that accepts a file of varying formats from a user in order to import large amounts of data into our systems. One of the mo

One-to-one integer mapping function

We are using MySQL and developing an application where we'd like the ID sequence not to be publicly visible... the IDs are hardly top secret and there is no sig

How to SHA1 hash a string in Android?

In Objective C I've been using the following code to hash a string: -(NSString *) sha1:(NSString*)stringToHash { const char *cStr = [stringToHash UTF8S

Parsing URL hash/fragment identifier with JavaScript

Looking for a way to parse key pairs out of the hash/fragment of a URL into an object/associative array with JavaScript/JQuery