Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hashing]

The tag has no usage guidance.

3
votes
1answer
116 views

User implemented SHA-1 isn't outputting correct hash

EDIT: I'm actually Thinking the issue is in the initialization phase, where we pad the message with 1's, 0's, and the message ...
1
vote
0answers
34 views

Keyed Hash for HMAC SHA256 [duplicate]

I'm trying to use AWS REST API's (because I can't rely on AWSLink`). The sample C# code from Amazon uses this a lot: ...
1
vote
1answer
58 views

Problem passing argument in hash table from global context to a module

I was experimenting with passing arguments via a hash table to a module. Found a very strange result. When I pass a function to be plotted inside the module, it comes out empty. Yet all argument ...
16
votes
2answers
1k views

How has Hash changed in 11.3?

There are already few topic related to Hash[_String]: How does Hash calculate hash for strings? Incorrect calculating Hash SHA256 But it looks like changes are ...
1
vote
2answers
150 views

Incorrect calculating Hash SHA256

At the moment I'm using version 11.2. A few days ago, after an update in my programs, I found errors. It turned out that the new version incorrectly computes the hash. I'm using method SHA256. And ...
17
votes
1answer
400 views
8
votes
1answer
244 views

How does Hash calculate hash for strings?

I have this code Hash["a","SHA"] Hash[ToCharacterCode["a"],"SHA"] and I was expecting to get the same result, but somehow it is different. My question is: how ...
4
votes
2answers
130 views

J/Link HMAC Base64

I am trying to recreate a Java algorithm in Mathematica. It is taking a key and signing a message using the HMAC and SHA256 algorithm. The Java code for which I am basing it off is here I have ...
3
votes
1answer
110 views

Using Mathematica how can I simulate the MD5 or SHA encryption of a userid and password performed by htpasswd on Apache?

htpasswd hashes a user's password using the userid. Thus this generator takes both userid and password as inputs and then it outputs a line for inclusion in the <...
5
votes
5answers
518 views

Help converting geohash string to latitude, longitude?

I'm having difficulty converting a geohash string to latitude and longitude with Mathematica and wondered if I'm missing a built in function that already has the functionality available? (I'm still ...
3
votes
1answer
554 views

API HTTP Request Signing using base64 encoding/decoding and HMAC (Cryptocurrencies Exchange, GDAX)

I am trying to access the GDAX API private methods which can be seen here, GDAX Documentation There is some great Python code that does it that I am trying to recreate in Mathematica. That code can ...
0
votes
0answers
70 views

Algorithm that will trim a unique ID number and produce a shorter unique ID

I have a unique ID number with 2^128 magnitude length (128 bits). This means ~3.4e+38 which is quite large that my actually needs, spending valuable time in a transmission protocol. There is a ...
4
votes
1answer
158 views

HMAC-SHA512 in mathematica and $SystemShell differences

Hi I'been trying to rebuild the script to get hmac-sha512 but could not get it work ...
6
votes
2answers
125 views

Hash reliability for uniqueness?

I have an algorithm that produces certain entries of data and appends them to a list myList = {};. For example, after five iterations the list might look like: <...
3
votes
1answer
184 views

Read RDF N-Triples and replace them with a hashed index 'on the fly'

I want to process a 181GB uncompressed RDF N-Triples file. You may download a small sample file (4KB) and read the file line by line. ...
13
votes
3answers
1k views

How to calculate SHA256 of a number, not string

Mathematica always interprets the input of the Hash function as a string. I would expect this: ...
1
vote
0answers
100 views

Is this a serious flaw in Mathematica's default hashing algorithm

Below, I define two expressions X and Y (which arose in the wild!) such that not only ...
7
votes
1answer
335 views

HMAC implementation in pure Mathematica

I am trying to implement the HMAC algorithm in Mathematica. The algorithm is a relatively simple way of signing messages with a key. Here is some pseudocode from Wikipedia: My attempt: ...
2
votes
0answers
131 views

When does Mathematica automatically use dispatch tables for function evaluation? [closed]

I've read the documentation for Dispatch, and it says: Lists of rules produced by assignments made with = and := are automatically optimized with dispatch tables ...
5
votes
2answers
414 views

Why should we make sure the calculated MD5 is of length 32?

I see when people write code on calculating MD5, (even in the documentation), they write like this: IntegerString[Hash[something, "MD5"], 16, 32] But I think ...
6
votes
2answers
670 views

Why does the hash of a file differ from the hash of its content?

FileHash doesn't allow arguments like FileHash[file,{"CRC32","MD5"}]; A solution could be: ...
28
votes
2answers
841 views

Default behaviour of Hash[expr] and hashing in different versions of Mathematica

In different versions of Mathematica, Wolfram silently changed the behaviour of Hash when the algorithm is not specified explicitly ...
13
votes
3answers
1k views

Why does Hash return different values in Version 7?

This function does not work correctly for me. The generated Gravatars do not match the ones actually produced by using the corresponding address. The problem was traced to differing output from the <...