[Solved] hashes — Seem like mutant potatoes [closed]

There’s a wealth of information out there, http://ruby-doc.org/core-2.3.0/Hash.html for example is pretty clear on what hashes are. You need to get your head around some of the basics, there are plenty of tutorials out there, https://www.railstutorial.org/ is one that comes up often, http://guides.rubyonrails.org/getting_started.html is the most obvious place to start. 2 solved hashes — Seem … Read more

[Solved] How I can convert this function to php?

This should do the trick: <?php function hash_data($data) { $data = mb_convert_encoding($data, ‘UTF-16LE’, ‘UTF-8’); $hash = hash(‘sha512’, $data, true); return base64_encode($hash); } $user=”admin”; $password = ‘secret’; $key = “7f9facc418f74439c5e9709832;0ab8a5:OCOdN5Wl,q8SLIQz8i|8agmu¬s13Q7ZXyno/yv.XSN1DsgKq9zi]XrE^gx8vPC^Av8=e/bF4pX1Oe hfqGb#JK~RONkS1wx5w=RE0$” . “DxZSu7evPfshBw7p5Gb&suEkw=RE0DxZSu7e´vPfshBw7p+5GbsuEkw=H1fTWFXfsXo}z0fOd{KTt[IdDG2y6E=”; $data = $user . $password . $key; // 6xecArT38JVtGKH2yQs/T6btOUF41vW5ptaPjgrd8hTaZZKnbJed5551LuYV7vR/Dr3Jb873JMvX0je+8XUpxw== echo hash_data($data); solved How I can convert this function to php?

[Solved] password_verify won’t work [closed]

$sql=”SELECT [..snip..] and password=’password_verify($password, $hashAndSalt)'”; ^^^^^^^^^^^^^^^ You cannot embed PHP code in a string and expect PHP to execute it, nor will MySQl execute PHP code for you, since MySQL has absolutely no idea what PHP is. Even if that php function call did magically somehow get executed, it can only ever return a boolean … Read more

[Solved] computing hashValue of a file

The problem is you declare resultstream as CHAR resultstream[33]; but then you use in your code resultstream[33] = ‘\0’; The resultstream array is 0 indexed so valid values are 0-32, you are accessing memory not allocated for that array (hence the “Access violation”) 0 solved computing hashValue of a file

[Solved] Get Last element from unordered_set [closed]

In an unordered_set, the order of inserts does not necessarily correspond to the order that you will get when the set is iterated (hence the name “unordered”). Part of the reason why a bi-directional iterator is not supported(using a — operator) in this data structure is because being able to go backwards/forwards on an unordered_set … Read more

[Solved] How to create hash with duplicate keys

Perl is telling you exactly what is wrong. You have used the strict pragma, so using the %hash variable without declaring it is a syntax error. While the string %hash does not appear in your code, the string $hash{…} does, on each of the problem lines. This is the syntax to access an element of … Read more

[Solved] Does showing hashes compromise security? php

I would agree with the others who have asked why you need to do this, however moving past that to your question, yes it is a bad idea. For starters, from the password you supplied, I can tell you’re using some form of bcrypt. Admittedly bcrypt is a very strong hashing algorithm that isn’t easily … Read more

[Solved] hash password and verify it with same variable [duplicate]

password_verify matches your plain password against hashed version of your given password while you’re checking with plain password in both parameter. password_verify works like this: password_verify($plainPassword, $hashedPassword) <?php // See the password_hash() example to see where this came from. $hash=”$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq”; if (password_verify(‘rasmuslerdorf’, $hash)) { echo ‘Password is valid!’; } else { echo ‘Invalid password.’; } … Read more

[Solved] What is this encryption type? [closed]

Looks like Base64 to me. Any time I see encoding ending with ‘=’ or ‘==’ it is my first guess. I can see ‘sales’ and ‘product id’ after decoding your first example though it isn’t completely readable. May be double encoded or have other non-printable characters as field delimiters. Hopefully this gets you heading in … Read more

[Solved] Java hashing function to return int that does not exceed Integer.MAX_VALUE [closed]

1 The methods you used were for returning longs. The method you should use is String.hashCode() if you don’t need hashing for security purposes. Make sure to cast an integer as a String through String.valueOf(int) before hashing it, since you said you want to hash ints as well. int hash = String.valueOf(input).hashCode(); 2 Edit: Added … Read more

[Solved] HashMap key generation based on hashing

The problem here is that the hashCode of an array does not depend on the contents, but on the reference. That means that if you have two conjunction / disjunction keys that are equal, but the contained arrays are not the same objects, then the hashcode of the keys will be different. The solution that … Read more

[Solved] Perl Column comparison in two files

I’m going to guess you already have code for reading each of these files, and just need to parse out the values and organize them. The design part is coming up with a key that is unique for each start,end pair, but not hard to work with. Since start and end are numbers, this should … Read more