Questions tagged [string-hashing]

90 questions
0
votes
2 answers

Performance of stdext::hash_value() defined in std::hash_set

Firstly,I want to inform you that my overall/main target is to execute certain functions using their function name(string) as an argument,I defined a function as below: (I want to generate a unique number for each string data that I inserted as…
Buddhika Chaturanga
  • 957
  • 2
  • 14
  • 29
0
votes
2 answers

text-simplification over php to simplify searches

I am working on a function to allow searching people in the same city. Since I am not looking forward into using geolocation, I have user input their city. So, in order to have people find each other they need to input the same city name. Now, I am…
john smith
  • 541
  • 6
  • 24
-1
votes
1 answer

String algorithm with hashing

We have a list of strings. I given smaller subsquences with atmost three dashes in between the letters I have to find the maximum number of matches it can make. Eg. 1243, 3452, 2343,124 1_4_ Answer is 2 as 1243 and 124 both matches. We can either…
ChocoLite
  • 111
  • 5
-1
votes
4 answers

Repeated DNA sequence

The problem is to find out all the sequences of length k in a given DNA sequence which occur more than once. I found a approach of using a rolling hash function, where for each sequence of length k, hash is computed and is stored in a map. To check…
Jhanak Didwania
  • 581
  • 2
  • 5
  • 12
-1
votes
1 answer

Is it more secure to salt a string with a hash of itself?

So I've been looking at hashing passwords in vb.net and came across this thread (https://security.stackexchange.com/questions/17421/how-to-store-salt/17435#17435) and it showed about the salt only increasing the time to make brute force attack if…
-1
votes
1 answer

Will similar Strings in HashMap lead to increased chance of collisions?

Consider the following: HashMap hm = new HashMap<>(); final String prefix = "My objects "; int counter = 0; void put(Object value) { hm.put(prefix+(counter++), value); } Given that the key of each entry starts with the same…
Sina Madani
  • 1,246
  • 3
  • 15
  • 27
-1
votes
1 answer

How to securely save secret key on disk?

I am building an application that connect to a 3rd party app to get some info, my idea was to design it in a way that the app control the password, it can change it once in a while, hash it and keep the hashed password somewhere. this way no human…
koolaang
  • 397
  • 6
  • 15
-1
votes
1 answer

Salted Passwords

I have been reading on correct procedures for storing and checking user passwords, and am puzzling a little with salts. I get the idea that they are to prevent use of such tools as rainbow tables, but to me the idea of storing the salt along with…
sidjames
  • 117
  • 6
-1
votes
1 answer

Hashing google interview

why can't powers of 2 or power's of 10 or prime numbers be good hashing functions? If we want to store overflow records in a hash function, why aren't those good for selection of hashing functions?
-2
votes
1 answer

Generating a set of unique numbers/strings from a given string

I am working on a project where I need to assign some people with an unique ID. Now I have this requirement that, based on those IDs, I need to generate a set of unique numbers. No two IDs should result in the same set, and the intersection of sets…
-2
votes
2 answers

Best way to define a hashcode method for char array

Best way to define a hashcode method for char array. Is there a better way to implement our own hascode() method for minimum collision? char arr1[]={'a','b','c'}; char arr2[]={'b','a','c'}; char arr3[]={'c','a','b'}; int hashcode() { int p=31; …
shubham26
  • 11
  • 3
-2
votes
2 answers

Generate Reproducible "Gibberish" from a given String

I am looking for something that acts sort of like a Hashing Algorithm, except I want it to generate an array of predefined length given any arbitrary string. As an example: Arbitrary Seed: "Entropy" Desired Length: 100 Reproducible characters from…
Krythic
  • 4,184
  • 5
  • 26
  • 67
-2
votes
5 answers

Secure hashing method

In an MVC style web app, what's the best/most secure way of setting up a hashing method that's available globally? I've just been doing this within my core controller that is extended by the rest of my scaffolding: class Core{ protected…
Dan
  • 425
  • 2
  • 11
-2
votes
1 answer

How to generate desired size (example 8096) long bit hash codes - c#

There are many hashing methods but I want to compose bit hash with 8096 bits long. Is it possible to achieve this? For example when I enter "House" I should get a string like: "0101010001010101..." (8096 bits) How can i achieve this (using C# 4.0…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
-4
votes
1 answer

Hashing a dictionary from mysql database

I have a problem with mysql database when I try to find a code that can help me with getting multiple results for the word "get". I find only one suggestion when I search through a database. Here is what I get Enter a word to search_______________:…
1 2 3 4 5
6