sha512

Does VBA have a Hash_HMAC

社会主义新天地 提交于 2019-11-28 09:31:02
Hi I am trying to Encrypt a string to invoke a web service from VBA. I need to do the following function in VBA and i have example code in PHP. Here is the PHP code. Does anyone know how to do this in VBA? $binaryHash = hash_hmac('sha512', $url.$timestamp, $ws_session_array["sharedSecret"], true); $hash = base64_encode($binaryHash); Here's what you need: Public Function Base64_HMACSHA1(ByVal sTextToHash As String, ByVal sSharedSecretKey As String) Dim asc As Object, enc As Object Dim TextToHash() As Byte Dim SharedSecretKey() As Byte Set asc = CreateObject("System.Text.UTF8Encoding") Set enc =

What is the length of a hashed string with SHA512?

喜夏-厌秋 提交于 2019-11-28 07:07:32
Is the length of a string hashed with sha512 always the same? If so, what is it? As the name implies, it's 512 bits, that is 64 bytes. But that's the hash, maybe you're wondering about a specific representation of that hash in string, as is commonly used, then it depends of the given representation. If you write the hash in hexa, then it will be 128 characters. If you write the hash in base64, then it will be 86 bytes (or 88 with padding). 来源: https://stackoverflow.com/questions/18236106/what-is-the-length-of-a-hashed-string-with-sha512

How insecure is a salted SHA1 compared to a salted SHA512

南笙酒味 提交于 2019-11-27 16:38:37
问题 SHA1 is completely insecure and should be replaced. This question is 8+ years old and times have changed: https://arstechnica.com/information-technology/2017/02/at-deaths-door-for-years-widely-used-sha1-function-is-now-dead/ For passwords: https://en.wikipedia.org/wiki/PBKDF2 For data: SHA3 SHA512 is more complex than SHA1, but how much security am I losing by hashing a salted password with SHA1 compared to hashing it with 512? in terms of the time it would take for someone who has the db to

How to hash a password with SHA-512 in Java?

喜夏-厌秋 提交于 2019-11-27 11:22:32
I've been investigating a bit about Java String encryption techniques and unfortunately I haven't find any good tutorial how to hash String with SHA-512 in Java; I read a few blogs about MD5 and Base64, but they are not as secure as I'd like to (actually, Base64 is not an encryption technique), so I prefer SHA-512. A. Sinha you can use this for SHA-512 import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public String get_SHA_512_SecurePassword(String passwordToHash, String salt){ String generatedPassword = null; try {

SHA-512 hashing a byte array in ColdFusion

狂风中的少年 提交于 2019-11-27 08:35:45
问题 I am using ColdFusion 9 Referencing Ben Nadel's good works on his blog, I tried ucase(digestUtils.sha512(imageBinary)) For SHA-512 hashing I get that dreaded: The sha512 method was not found. Either there are no methods with the specified method name and argument types or the sha512 method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists,

C# equivalent to hash_hmac in PHP

一笑奈何 提交于 2019-11-27 07:50:01
using .NET and C# i need to provide an integrity string using HMAC SHA512 to a PHP server . Using in C# : Encoding encoding = Encoding.UTF8; byte[] keyByte = encoding.GetBytes(key); HMACSHA512 hmacsha512 = new HMACSHA512(keyByte); byte[] messageBytes = encoding.GetBytes(message); byte[] hashmessage = hmacsha512.ComputeHash(messageBytes); return(ByteToString(hashmessage).toUpper()); But it doesn't match with PHP hash_hmac() PHP code : $hmac = strtoupper(hash_hmac($pbx_hash, $msg, $binKey)); I try to change encoding in C# (utf8, ASCII,Unicode) Without success. I've tried many solution found on

Best practice for hashing passwords - SHA256 or SHA512?

天涯浪子 提交于 2019-11-27 02:04:24
问题 I am currently using SHA256 with a salt to hash my passwords. Is it better to continue using SHA256 or should I change to SHA512? 回答1: Switching to SHA512 will hardly make your website more secure. You should not write your own password hashing function. Instead, use an existing implementation. SHA256 and SHA512 are message digests , they were never meant to be password-hashing (or key-derivation) functions. (Although a message digest could be used a building block for a KDF, such as in

What is the length of a hashed string with SHA512?

左心房为你撑大大i 提交于 2019-11-27 01:43:38
问题 Is the length of a string hashed with sha512 always the same? If so, what is it? 回答1: As the name implies, it's 512 bits, that is 64 bytes. But that's the hash, maybe you're wondering about a specific representation of that hash in string, as is commonly used, then it depends of the given representation. If you write the hash in hexa, then it will be 128 characters. If you write the hash in base64, then it will be 86 bytes (or 88 with padding). 来源: https://stackoverflow.com/questions/18236106

How to hash a password with SHA-512 in Java?

▼魔方 西西 提交于 2019-11-26 17:59:36
问题 I've been investigating a bit about Java String encryption techniques and unfortunately I haven't find any good tutorial how to hash String with SHA-512 in Java; I read a few blogs about MD5 and Base64, but they are not as secure as I'd like to (actually, Base64 is not an encryption technique), so I prefer SHA-512. 回答1: you can use this for SHA-512 import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public String get_SHA

C# equivalent to hash_hmac in PHP

ⅰ亾dé卋堺 提交于 2019-11-26 13:46:32
问题 using .NET and C# i need to provide an integrity string using HMAC SHA512 to a PHP server . Using in C# : Encoding encoding = Encoding.UTF8; byte[] keyByte = encoding.GetBytes(key); HMACSHA512 hmacsha512 = new HMACSHA512(keyByte); byte[] messageBytes = encoding.GetBytes(message); byte[] hashmessage = hmacsha512.ComputeHash(messageBytes); return(ByteToString(hashmessage).toUpper()); But it doesn't match with PHP hash_hmac() PHP code : $hmac = strtoupper(hash_hmac($pbx_hash, $msg, $binKey)); I