sha512

SHA256-CRYPT / SHA512-CRYPT in node.js

无人久伴 提交于 2019-12-02 20:26:13
问题 I use dovecot as my mail transfer agent and I aim to use the strongest password scheme which is supported by my system: SHA512-CRYPT or SHA256-CRYPT (BLF-CRYPT doesn't work). For my own written webinterface I look for a function or library in node.js for hashing a password (with SHA***-CRYPT). 回答1: You may consider checking: https://github.com/mvo5/sha512crypt-node which contains a implementation for sha512crypt in JS. Its very new but passes the testvectors from the glibc reference

How to decrypt a “sha512” encrypted variable?

瘦欲@ 提交于 2019-12-02 08:14:34
I have this code: $password = vancab123; password_hash(base64_encode( hash('sha512',$password, true) ), PASSWORD_DEFAULT ); Database stored value: $password = $2y$10$jUa8ZEFBX5lfsBmySUnJFeSSyKwQ1v/emazJZPh8MwJ0g0lLbmjYC; My Problem: I used that on "remember me" function. If the user used that function his/her credentials (email and password) will be saved for 7 days using cookie. My problem is because the email and password will automatically fill up the email and password text boxes, the password text box characters is too long because it was hashed. How can I match the length of the hashed

How to encrypt a password that is inserted into a MySQL table? [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-01 17:56:06
问题 This question already has answers here : How do you use bcrypt for hashing passwords in PHP? (10 answers) Closed 2 years ago . I have some code to register that works, but I don't know how to hash the password. I want to use sha512. $con=mysqli_connect("localhost","root","","users"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql="INSERT INTO users (username, password, email) VALUES ('$_POST[username]','$_POST[password]',

How to Verify a RSA-SHA512 XML Signature in .NET?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 17:08:43
问题 With the help of the MSDN site about SignedXml, I can easily verify if an XML DSig is correct. It works perfectly if the signature method sha1 was used. However, when I receive the SignatureMethod RSA-SHA512 (http://www.w3.org/2001/04/xmldsig-more#rsa-sha512), CheckSignature() breaks with an CryptograhicException: SignatureDescription could not be created for the signature algorithm supplied. It seems like CheckSignature() is not able to verify RSA-SHA512 signatures. Does anyone know how to

Why do these two files hash to the same value when I use MemoryStream?

隐身守侯 提交于 2019-12-01 16:03:39
问题 I'm writing a c# routine that creates hashes from jpg files. If I pass in a byte array to my SHA512 object then I get the expected behavior, however, if I pass in a memory stream the two files always hash to the same value. Example 1: SHA512 mySHA512 = SHA512.Create(); Image img1 = Image.FromFile(@"d:\img1.jpg"); Image img2 = Image.FromFile(@"d:\img2.jpg"); MemoryStream ms1 = new MemoryStream(); MemoryStream ms2 = new MemoryStream(); img1.Save(ms1, ImageFormat.Jpeg); byte[] buf1 = ms1

Vb.net Decrypt sha512 hash

烈酒焚心 提交于 2019-12-01 13:35:56
Heys guys, I'm struggling about out to decrypt the hash how my sha512 encryption. I'm searching a way to finnaly decrypt it. By the way this is how I do the encryption: Dim uEncode As New UTF8Encoding() Dim bytClearString() As Byte = uEncode.GetBytes("to encrypt") Dim sha As New _ System.Security.Cryptography.SHA512Managed Dim WordEncrypt As String = "" Dim hash() As Byte = sha.ComputeHash(bytClearString) For Each b As Byte In hash WordEncrypt &= b.ToString("x2") Next What i need now is to know how to decrypt it. Wolfwyrd SHA512 is not an encryption algorithm, it's a hashing algorithm. What

Porting SHA512 Javascript implemention to Actionscript

巧了我就是萌 提交于 2019-12-01 11:49:46
I am wondering if anyone can help me in porting a SHA-512 implemention in Javascript to Actionscript. Since both Javascript and Actionscript share the same origin, I think porting it will be easy for people who are used to Actionscript. The code for sha512 in javascript can be found here: http://pajhome.org.uk/crypt/md5/sha512.html Thank you. Here is the code ported by me. The code is separated between two files Int64.as and Sha512.as, both of them belong to the com.crypto package. com/crypto/Int64.as /* * Int64 for ActionScript * Ported by: AAA * Ported from: See below */ /* * A JavaScript

Vb.net Decrypt sha512 hash

半世苍凉 提交于 2019-12-01 10:57:09
问题 Heys guys, I'm struggling about out to decrypt the hash how my sha512 encryption. I'm searching a way to finnaly decrypt it. By the way this is how I do the encryption: Dim uEncode As New UTF8Encoding() Dim bytClearString() As Byte = uEncode.GetBytes("to encrypt") Dim sha As New _ System.Security.Cryptography.SHA512Managed Dim WordEncrypt As String = "" Dim hash() As Byte = sha.ComputeHash(bytClearString) For Each b As Byte In hash WordEncrypt &= b.ToString("x2") Next What i need now is to

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

我们两清 提交于 2019-11-30 20:35:29
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 ) 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).ToUpper(); } BitConverter works just fine ... var testVal = "asdasd"; var enc = new ASCIIEncoding(); var bytes

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

妖精的绣舞 提交于 2019-11-30 11:07:45
问题 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