Questions tagged [string-hashing]

90 questions
0
votes
2 answers

Hash-like Functions

Are there any cryptographically secure hash functions that can be given a array of strings to hash, and will always calculate the same output no matter what order the array elements are in? I realize that one could merge the array elements into one…
Lev Knoblock
  • 611
  • 2
  • 6
  • 20
0
votes
1 answer

PHP: Installing Libsodium to PHP v5.5

How to correctly install Libsodium with PHP verson 5.5. I'm trying to follow the instruction on https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium Here are the steps I did: Go to…
Jemru
  • 2,091
  • 16
  • 39
  • 52
0
votes
1 answer

How to hash variable-length strings

I am very much a beginner in encryption/hashing. And I want to know how to hash a variable length string, maybe 10 or 100 letters to a fixed length code, e.g. 128-bit binary, regardless of the underlying programming language, while achieving…
wenduowang
  • 37
  • 9
0
votes
3 answers

Is it possible to write hashing algorithm for following requirement?

All input will be lowercase English alphabet. HashString("ab")= should be unique value HashString("ba")= should give me the same value as above I tried with assigning each alphabet with a number, but it turned out to be wrong logic My attempt…
Mohanraja
  • 186
  • 1
  • 1
  • 11
0
votes
1 answer

Generating a string hash to compare two substrings

I have a string "abcdbca" and I'm instructed to slice two subarrays, say [0:3] and [4:7], I get strings "abc" and "bca". I've to find out if the two substrings are similar(same elements, max_allowed_mismatch_error = 1). I tried count sort, but…
ghost-sdk
  • 1
  • 1
0
votes
2 answers

How to check if the first n bytes of a string are zeroes?

long nonce; String message = "blahblabahlsdhqwi"; String digest = digest("SHA-256", String + nonce); byte[] digestBytes = digest.getBytes(); I'm trying to hash through a message whilst incrementing a nonce until I find a digest that has the first 4…
Chimp_Town
  • 185
  • 1
  • 3
  • 14
0
votes
1 answer

How do I show the hash of a string in a ListBox?

I have a project where I have to create my own linear hash, bucket hash and quadratic hash algorithms, so I choose to hash some strings, but I've run into a little problem where I have 2 ListBoxes: A ListBox full of strings A ListBox full of the…
Rutger
  • 1
  • 3
0
votes
1 answer

Password hashing - Compare 2 strings

I've just added in a function to hash and salt passwords which are stored in an Access database "Memo" field. The hashing/salting works fine, but I can't find anything on the internet which tells me how to then decrypt them. I did see somewhere that…
David
  • 2,298
  • 6
  • 22
  • 56
0
votes
1 answer

match a pattern using hashing in java

I was trying to learn how to match a pattern in a given text string using multiple hashing. I have found the following implementation in java: void multiHashing() { int counter = 0; int d = 26; int r = 10; int [] qP = qPrimes(d,r);…
user6216509
0
votes
1 answer

Hashing using md5 and sign using private certificate

I have a requirement wherein I have to generate a URL where one of the parameter is signature and signature has to be generated using below requirement in a Java Application: The other 4 URL parameter values should be hashed (in the order specified…
Neel
  • 199
  • 3
  • 18
0
votes
1 answer

Hashing and Converting To Base64 from C# to SQL

I try to rewrite the following C# method to SQL Server 2014 code. So far to no avail. public static string GetHash(string input) { HashAlgorithm hashAlgorithm = new SHA256CryptoServiceProvider(); byte[] byteValue =…
rudimenter
  • 3,242
  • 4
  • 33
  • 46
0
votes
3 answers

convert byte array to string in java

I try to convert byte array to string in java using new String( bytes, "UTF-8") method, but they only return the object. like this @AB4634bSbbfa So, I searched some way to solve this problem. I finally get valid string array, by converting hex-code…
bubu uwu
  • 463
  • 2
  • 12
  • 26
0
votes
2 answers

Spring Security not populating database with hashed password

I'm trying to populate the database with a hashed password and then log in to my application, by matching the data I'm submitting through my log in form, just like how a typical hashed password is suppose to work. I'm using spring security and…
dochsner
  • 249
  • 2
  • 8
  • 25
0
votes
0 answers

I am not very experienced and am trying to handle collisions in my hash table. However

I am not very experienced and am trying to handle collisions in my hash table. However, it just skips over it and doesn't write it at all. I figured the while loop with the conditional if would take care of it... I have been playing around with it…
Aven
  • 72
  • 10
0
votes
3 answers

Hashing unique strings with MD2

I have a list of unique email addresses - a very simple question. If the email is unique will the output always be unique, hash('md2', $email);
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192