Questions tagged [sha2]

sha-2 refers to the family of secure hash functions consisting of SHA-224, SHA-256, SHA-384, and SHA-512. These are defined by the US NIST in FIPS 180-4.

sha-2 refers to the family of secure hash functions consisting of SHA-224, SHA-256, SHA-384, and SHA-512. These are defined by the US NIST in FIPS 180-4.

135 questions
3
votes
2 answers

How to use PBEWITHHMACSHA256ANDAES_256 algorithm from JCE

I'd like to use the PBEWITHHMACSHA256ANDAES_256 algorithm from the SunJCE provider in Java8. It looks like the jars and all of the config is in place out-of-the-box in Java8 but I'm not able to use the PBEWITHHMACSHA256ANDAES_256 algorithm. I have…
lance-java
  • 25,497
  • 4
  • 59
  • 101
3
votes
1 answer

PHP security sha2: &$salt = null?

I am now creating a sha2 login form after researching and asking for help around online, I find the example code from this link below is quite useful and practical (I hope I am right!??), the only thing I don't understand is the way this programmer…
Run
  • 54,938
  • 169
  • 450
  • 748
3
votes
1 answer

Rfc2898DeriveBytes with Sha2 in C#

I have a password hashing mechanism based upon Rfc2898DeriveBytes (based on code detailed here: http://crackstation.net/hashing-security.htm). Internally, this class utilizes SHA1 which - the CrackStation link does indicate the SHA1 is "old", but…
David Mullin
  • 688
  • 1
  • 8
  • 21
2
votes
0 answers

Choosing salt and key size for Rfc2898DeriveBytes

I'm working on upgrading the password hashing function in a legacy asp.net application. It was using Rfc2898DeriveBytes with the default SHA1. I've upgraded the application now to .Net 4.7.2, so I'm now able to choose a better hashing…
user1751825
  • 4,029
  • 1
  • 28
  • 58
2
votes
3 answers

Hashing a string to a specific length

I have been tasked with getting a string to encrypted to a certain length. Ideally....the function should take as parameters... String to be encrypted of variable size the length of the resulting encrypted string It does not need to be decrypted.…
TheFootClan
  • 165
  • 1
  • 3
  • 12
2
votes
1 answer

PBEWITHHMACSHA256ANDAES_256 encryption throws EncryptionOperationNotPossibleException

I'd like to use the PBEWITHHMACSHA256ANDAES_256 algorithm but it's not supported. I've added the bouncy castle provider to my test in the hopes that it will work but to no avail. Can anyone please tell me how to fix the test below such that…
lance-java
  • 25,497
  • 4
  • 59
  • 101
2
votes
1 answer

Using SignTool.exe to sign using SHA256 after Microsoft dropped support for SHA-1

Since MS dropped SHA-1 support we now need to sign with SHA-2. I sign all dlls, exe and msi. I changed my signtool.exe call to this: signtool.exe /f "PathToPFX.pfx" /fd SHA256 /p "password" /d "product" /du "www.site.com" /tr…
2
votes
1 answer

Server returned error - The data necessary to complete this operation is not yet available for VB script

Why can't the code below connect successfully to servers that require SHA2 certs? One of our partners had a SHA2 upgrade and they require us to have SHA2 certs. When we connect to their site that doesn't require SHA2 certs(only SHA1) it connects…
BV45
  • 605
  • 3
  • 10
  • 27
2
votes
2 answers

How to extract salt from sha512 digest?

I encoded(sha512 hash)the password string "hello" using the salt string "world" and saved the string in a file. hex:…
BEPP
  • 875
  • 1
  • 12
  • 36
2
votes
0 answers

Android hybrid app not working with SHA2 certificates

I have a hybrid Android app that uses a number WebView controls to display HTML content. From the HTML I've calling APIs via jQuery using HTTPS. Everything has been working fine with the certificates configured to use SHA1 but now that the servers…
Cesar Vinas
  • 343
  • 1
  • 10
  • 20
2
votes
2 answers

Perl combine MD5 / SHA2 sum from multiple files to a MD5 / SHA2 sum

Below is the code which generates MD5 / SHA2 sum of individual files present under directory or sub directories recursively. #!/usr/bin/perl -w use strict; use warnings; use File::Find; use IO::File; use Digest::MD5; use Digest::SHA…
Abhinav
  • 975
  • 4
  • 18
  • 35
2
votes
2 answers

Pure lua hashing, RIPEMD160 or SHA2?

Are there any implementations of these hashing algorithms in pure lua? I've found a couple for MD5 and SHA1 but none for these two which are the ones I'll be needing for a project. In the interests of portability, I need something in pure lua.…
Zmoneaux
  • 21
  • 2
1
vote
0 answers

Comparison of accuracy between SHA-512 and compound CRC-32s of the same width

I need a highly-accurate checksum to do checking of data approximately 512KB in length. I know of and have used several different checksums before but I've never really needed to care about accuracy this much until now, so I'm looking to find out…
Erkling
  • 509
  • 4
  • 16
1
vote
1 answer

How does MySQL know which algorithm to use when reading logins stored in mysql.user?

I see that MySQL 5.5 allows use of SHA-2() for setting passwords, and that straight MD5 hashes are insecure and should no longer be used (ditto for default PASSWORD function). Before I go UPDATE happy and change a bunch of passwords, how does…
a coder
  • 7,530
  • 20
  • 84
  • 131
1
vote
1 answer

Sha2 function return empty/null values in snowflake

I am using sh2 function to generate the hash value but It is generating null/empty if any of the column value has null/empty. For example Input select sha2(NULL, 256); Output NULL is there any way to generate value even when the value inside sha2…
Manish
  • 71
  • 7
1 2
3
8 9