sha

Using SecureRandom with SHA-256

Using SecureRandom with SHA-256
I have been using SecureRandom with a seeded SHA1PRNG algorithm to create shared randomness between two processes. I recently learned that SHA1 is being deprecated according to NIST's standards, so we are making an effort to switch to SHA256. The pro

How to check if string is a valid sha256 hash in PHP?

How to check if string is a valid sha256 hash in PHP?
How do I manage to identify a sha256 hash using PHP? Also, is there any way to identify if the string is a sha256 hash even if it was salted?I don't need to know the real value of the hash (I know that is impossible), but I need only to validate the

can't insert special hash code into database

can't insert special hash code into database
I wanna save hashed password in mysql database,so I develop following method in CodeIgniter.private function hashing($password = '',$mail = '') { $hashcode = md5($password, $mail); return sha1($hashcode,md5($hashcode.$mail)); }for insert:$data = arra

Is it possible to solve for an input value of a hash in ruby if all other variables and output are known? (In ruby)

Is it possible to solve for an input value of a hash in ruby if all other variables and output are known? (In ruby)
This question is a little obscure, I'm trying to find out if its possible to "solve" for a value inputted into a hash in ruby, it looks like this:I have: @hash = Digest::SHA512.hexdigest(value1 + value2 + value3)Value2 & value3 are known, an

Bouncy Castle Sign and Verify SHA256 Certificate With C#

Bouncy Castle Sign and Verify SHA256 Certificate With C#
I have been through a large number of examples of how people use Bouncy Castle to dynamically generate RSA Key Pairs and then sign and verify all within one block of code. Those answers were great and really helped me ramp up quickly!That said, I nee

How can I access SHA intrinsic?

How can I access SHA intrinsic?
Gprof tells me that my computationally heavy program spends most of it's time (36%) hashing using AP-Hash.I can't reduce the call count but I would still like to make it faster, can I callintrinsic SHAfrom a c program?Do I need the intel compiler or

Does this TPM emulator follow TPM spec for extending PCR register?

Does this TPM emulator follow TPM spec for extending PCR register?
The following code is from TPM emulator from Mario Strasser. The spec says,PCR := SHA1(PCR || data)reads "concatenate the old value of PCR with the data, hash the concatenated string and store the hash in PCR". It's notPCR := PCR BITWISE-OR SHA1

Is MD5 less secure than SHA et. al. in a practical sense?

Is MD5 less secure than SHA et. al. in a practical sense?
I've seenafewquestionsandanswerson SO suggesting that MD5 is less secure than something like SHA.My question is,Is this worth worrying about in my situation?Here's an example of how I'm using it:On the client side, I'm providing a "secure" check

What is the SHA-256 hash of a single “1” bit?

What is the SHA-256 hash of a single “1” bit?
The definition of SHA-256 appears to be such that the input consisting of a single "1" bit has a well-defined hash value, distinct from that of the "01"byte(since the padding is done based on input's length in bits).However, due to end

Encrypting a file with a weak password, bcrypt or SHA-256 + AES-256?

Encrypting a file with a weak password, bcrypt or SHA-256 + AES-256?
I start with a weak password (8 lower case characters for ex) and a file. I need to encrypt that file using that password. Result has to be secure against known attacks.Approach 1: I could hash the password using SHA-256 and then use the resulting ha

What is wrong with this sha 256 function?

What is wrong with this sha 256 function?
I'm starting to use crypto++ lib and maybe I have some misconceptions.I don't realize why the following code produces a bad sha 256# include <string> # include <iostream> # include "cryptopp/cryptlib.h" # include <cryptopp/sha.h&g

How many characters should I reserve in my database for storing SHA512 hash?

How many characters should I reserve in my database for storing SHA512 hash?
Column: pwdhashType: charMany web pages give me the bit size, not a character size. Should I use abinaryfield instead?64 byteswhen stored in BLOB.128 characterswhen stored as hex.~88 characterswhen stored asBase64.Yes, you should use a binary field.A

SSL Certificate: Signature Algorithm shows “sha256rsa” but thumbprint algorithm shows “sha1”

SSL Certificate: Signature Algorithm shows “sha256rsa” but thumbprint algorithm shows “sha1”
I have a certificate where Signature Algorithm shows "sha256rsa" but thumbprint algorithm shows"sha1". What will be the identification of my certicateSHA1/SHA2?Thanks!TL;TR: signature and thumbprint are totally different things. For st

How to resolve this: invalid conversion from 'const char*' to 'const uint8_t*

How to resolve this: invalid conversion from 'const char*' to 'const uint8_t*
I installed this SHA library:https://github.com/Cathedrow/Cryptosuite. I want to implement HMAC256 using Arduino IDE 1.6.7 installed on Win. 10 and the controller is ATMEGA328.I copied the example given in their webpage. I am still new and want to te
What Others Are Reading