Stack Exchange Network

Stack Exchange network consists of 174 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]

Challenges that involve summarizing a large amount of data in a single, much smaller number.

16
votes
14answers
1k views

Arbitrary Length Hashing

Consider you have a hash function \$\mathcal{H}\$ which takes strings of length \$2n\$ and returns strings of length \$n\$ and has the nice property that it is collision resistant, i.e. it is hard to ...
13
votes
15answers
2k views

Logic Gates Manually

Make a program that simulates the basic logic gates. Input: An all-caps word followed by 2 1 digit binary numbers, separated by spaces, such as OR 1 0. The gates <...
34
votes
18answers
4k views

26 Singers, 26 Letters

According to RollingStone, below are the 26 greatest singers of all time: ...
-7
votes
1answer
341 views

Implement the MD5 algorithm!

Your challenge is to output the MD5 hash of your input. The specification of MD5 can be found here. Crypto builtins are NOT allowed. Shortest code wins. Psuedocode: ...
12
votes
9answers
1k views

What characters are more common in my MD2 hash?

The challenge is simple Write a script that, when given a string input, will hash the string using the MD2 hashing algorithm, and then return either a positive integer or negative integer output ...
18
votes
3answers
615 views

Meta radiation hardener

Background On this site, we occasionally have questions requiring programs to be "radiation hardened"; this means that the program has to be able to survive the deletion of one or more bytes, no ...
8
votes
3answers
445 views

Geohash Generator

XKCD Comic: Goal: Given a date, the current Dow Opening, and your current coordinates as a rounded integer, produce a "geohash." Input: Input through any reasonable means (STDIN, function argument,...
34
votes
9answers
2k views

Help me recognise my monster

Background The computer game NetHack dates from 1987, before the use of graphics in computer games was widely established. There are lots of monsters in the game, and potentially a lot need to fit on ...
18
votes
4answers
1k views

Implement SHA-256

Given a sequence of bytes, output the SHA-256 hash value of the sequence. The SHA-256 Algorithm The following pseudocode is taken from the Wikipedia page for SHA-2. ...
14
votes
9answers
1k views

Compute CRC32 Hash

Credits This challenge originated from @miles. Create a function that computes the CRC32 hash of an input string. The input will be an ASCII string of any length. The output will be the CRC32 hash ...
72
votes
24answers
4k views

Tweetable hash function challenge

In this code-challenge you will write a hash function in 140 bytes1 or less of source code. The hash function must take an ASCII string as input, and return a 24-bit unsigned integer ([0, 224-1]) as ...
17
votes
5answers
3k views

Mine for 2016 in Bitcoins! PCG.SE New Year's Puzzle 2016

In the Bitcoin protocol, 2016 is a very special number. The "difficulty" of finding a hash to create a new block is adjusted every 2,016 blocks to approximate changing once every two weeks. This ...
2
votes
0answers
493 views

Make a program that outputs its own MD5 hash [duplicate]

Challenge: make a program that outputs a MD5 hash of its source code. You should not use tricks that would be considered cheating in a quine sense (discussed here). Using built-in functions and ...
12
votes
20answers
3k views

Cryptographic hash golf (robbers)

This contest is over. There are no remaining crackable answer in the cops challenge. Companion thread of Cryptographic hash golf As a reminder, here are the rules for robbers from the main ...
34
votes
23answers
4k views

Cryptographic hash golf

This contest is over. Due to the nature of cops-and-robbers challenges, the cops challenge becomes a lot easier when the interest in the associated robbers challenge has diminished. Therefore, ...
10
votes
6answers
439 views

Implement a Variable Length Hash

My friend and I have this game that we play with words. It is a fun pastime and it involves "canceling out" letters in a word until there is nothing left. I am really tired of him being so much faster ...
7
votes
6answers
2k views

Decode MD5, Brute Force

The Challenge Create a program that brute-force* decodes the MD5-hashed string, given here: 92a7c9116fa52eb83cf4c2919599c24a which translates to ...
7
votes
4answers
3k views

Un-hash the Java Hash

Hash Un-hashing The basic goal of this challenge is to exploit the high probability of collision in the Java Hash function to create a list of plausible inputs that created an outputted hash. The ...
-1
votes
3answers
641 views

Hide your hash function

So you are tasked with creating an open source password authentication system but you want to reveal as little about the implementation of the hash function as possible. Can you write a function that ...
62
votes
20answers
8k views

Hash collision: “NO” means “YES”

This Code Golf was inspired by the recent Daily WTF article You Can't Handle the True!, which features a string comparison written as: ...
8
votes
10answers
1k views

Write a hash function for Morse Code [closed]

Your goal is to write a hash function, that accepts morse code character and returns a hash code that you get to define. You can be sure, passed string will be: One of the Latin characters (A-Z) ...
13
votes
7answers
1k views

Morse code to standard output

This question involves taking input in Morse code as . (period) and - (minus symbol), with spaces to separate the input. Your task is to convert the code to standard output. You can assume that the ...
15
votes
5answers
947 views

Implementing the SHA-1 hash algorithm

The goal of this code-golf is to create a program that takes a string as input, and you have to output the SHA-1 hash value as a hexadecimal number. You can find the pseudocode for SHA-1 here Other ...