sha512

SHA512 hashes differ on android, php and javascript

不问归期 提交于 2019-11-30 10:39:16
I am using the SHA512 hash to transfer some encrypted data between my app and it's backend. However, I'm having a odd situation and have no idea what might be causing it. So, I've got following setups tested: Android 2x SHA512 Android 1x SHA512 -> CryptoJS 1x SHA512 PHP 2x SHA512 So, when I do the first 2x Android hashing, I get the same result as when I do the 1x android -> 1x cryptojs. However, when I do the PHP 2x, I get the same result as I get on the first Android pass, but the second encryption pass of the PHP is different. On PHP, I've tried both the hash() and openssl_digest()

hash a password string using SHA512 like C#

人盡茶涼 提交于 2019-11-30 06:22:14
问题 I am developing logon function for my iPhone Application, so I want to hash the password using the SHA512 hashing algorithm then get the result as NSString (the result should be the same with SHA512 in C#). After spending a lot of time in the internet, I still not find out the solution yet! :( Is there anyone has the solution and sample code, please help me! Thanks a lot! [Update] In my C# code, the password is stored using SecureString, so maybe it's cause make different byte array between

android sha512 example

只愿长相守 提交于 2019-11-30 05:32:31
Can someone provide an example for java/android on how to hash a password using PW_HASH_ITERATION_COUNT iterations of sha512 + salt? in pseudo code: hash = sha512(concat(pw,salt)); for (i = 1; i<PW_HASH_ITERATION_COUNT; i++){ hash = sha512(concat(hash,concat(pw,salt))); } Where z = concat(x,y) is the concatenation of x and y. Maybe using MessageDigest ? What would you suggest as PW_HASH_ITERATION_COUNT ? How many iterations would be the maximum so that this might even run on some older devices (2.1+) UPDATE UPDATE UPDATE Due to good reasons, we will use bcrypt to encrypt our passwords. We use

How can I reproduce a SHA512 hash in C# that fits the PHP SHA512?

心不动则不痛 提交于 2019-11-30 04:08:52
问题 The question is pretty much self-explanatory. I Googled many sites, many methods, tried many encodings, but I can't get it to match. I'm trying to make the string "asdasd" match. (http://www.fileformat.info/tool/hash.htm?text=asdasd) 回答1: Try this using System.Security.Cryptography public static string HashPassword(string unhashedPassword) { return BitConverter.ToString(new SHA512CryptoServiceProvider().ComputeHash(Encoding.Default.GetBytes(unhashedPassword))).Replace("-", String.Empty)

How can I create an SHA512 digest string in Java using bouncy castle?

女生的网名这么多〃 提交于 2019-11-29 23:18:51
This unit test is failing: public void testDigest() throws NoSuchAlgorithmException { String hashExpected = "150a14ed5bea6cc731cf86c41566ac427a8db48ef1b9fd626664b3bfbb99071fa4c922f33dde38719b8c8354e2b7ab9d77e0e67fc12843920a712e73d558e197"; MessageDigest md = new MessageDigest(); String hashActual = new String(md.digest("hi")); Assert.assertEquals(hashExpected, hashActual); } Below is my implementation of my MessageDigest class: import java.io.IOException; import java.io.InputStream; import java.security.NoSuchAlgorithmException; import java.security.Security; import org.bouncycastle.crypto

SHA512 hashes differ on android, php and javascript

和自甴很熟 提交于 2019-11-29 15:52:29
问题 I am using the SHA512 hash to transfer some encrypted data between my app and it's backend. However, I'm having a odd situation and have no idea what might be causing it. So, I've got following setups tested: Android 2x SHA512 Android 1x SHA512 -> CryptoJS 1x SHA512 PHP 2x SHA512 So, when I do the first 2x Android hashing, I get the same result as when I do the 1x android -> 1x cryptojs. However, when I do the PHP 2x, I get the same result as I get on the first Android pass, but the second

Excel formula-based function for SHA256 / SHA512 hashing without VBA or macros

与世无争的帅哥 提交于 2019-11-29 10:47:58
It's the year 2017 and anybody who needs to use hashes should avoid 'broken' ones such as MD5, if security is important. Has anybody found or created a way to do more secure SHA256 or SHA512 hashing in Excel, without using VBA or macros? A spectacular example of this being done before was over 3½ years ago with MD5 (as seen in this SO: MD5 Hash function in excel without using VBA ). Reason for avoiding VBA/Macros: Compatibility with mobile devices, such as Excel for iOS. Side Note: The original Stack Overflow post has a successful answer with a dead link, here is a new link for reference:

Reasons why SHA512 is superior to MD5

家住魔仙堡 提交于 2019-11-28 20:15:36
I was wondering if I could reasons or links to resources explaining why SHA512 is a superior hashing algorithm to MD5. It depends on your use case. You can't broadly claim "superiority". (I mean, yes you can, in some cases, but to be strict about it, you can't really). But there are areas where MD5 has been broken: For starters: MD5 is old, and common. There are tons of rainbow tables against it, and they're easy to find. So if you're hashing passwords (without a salt - shame on you!) - using md5 - you might as well not be hashing them, they're so easy to find. Even if you're hashing with

hash a password string using SHA512 like C#

China☆狼群 提交于 2019-11-28 17:34:17
I am developing logon function for my iPhone Application, so I want to hash the password using the SHA512 hashing algorithm then get the result as NSString (the result should be the same with SHA512 in C#). After spending a lot of time in the internet, I still not find out the solution yet! :( Is there anyone has the solution and sample code, please help me! Thanks a lot! [Update] In my C# code, the password is stored using SecureString, so maybe it's cause make different byte array between objective-c and C# Philippe Leybaert This function will hash a string using SHA512. The resulting string

How to decrypt SHA-512 hashed data [closed]

你离开我真会死。 提交于 2019-11-28 13:14:43
Update: SHA-512 is one-way so I will need to not attempt to crack passwords because it is easier to simply reset a password. If someone is aware of getting the original password from a SHA-512 hashed text, please let me know. Otherwise, I am moving on from this question. Thank you for all of your answers. Original Question: I have read a lot of articles that state that SHA-512 hashing cannot be unhashed. However, there is a source code for the various SHA-1 + algorithms here: https://tls.mbed.org/sha-512-source-code . I would like to know if it is possible to reverse this coding, in a way, to