sha2

Connect to MySQL using SHA2

99封情书 提交于 2020-01-17 07:22:49
问题 I have access to 2 MySQL Servers (one for production and one for development). I have the host, port, database, user, password and the CA Cert file for them. I could connect to both using mysql workbench and from the windows cmd. (Yes, I have to work on windows for now) Now according to security requirements, I need to connect using protocol TLSv1.2 or TLSv1.2, and Cipher AES256 and SHA2. These are currently not enforced on the development server, but they are on the production, and I am not

Is disposing this object, enough? or do i need to do more?

社会主义新天地 提交于 2020-01-16 02:27:25
问题 I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. } Do I need to put this line of code, just BEFORE I leave that dispose scope .. or does the dispose 'call' that already. sha2.Clear(); 回答1: Since AFAIK the Clear() method just calls Dispose, the using block should be enough to ensure that the resources used are released. 回答2: IMHO if calling Dispose() is not enough to dispose off an object then either there is a serious

sha512-crypt mysql and dovecot

≡放荡痞女 提交于 2020-01-01 03:01:09
问题 I have a question about understanding sha512-crypt hashing. I found this tutorial to set up dovecot and postfix with mysql. I followed the tutorial (with slight modifications) and everything works fine. But there is one thing, that I do not understand: To add a user, I should use: INSERT INTO `mailserver`.`virtual_users` (`id`, `domain_id`, `password` , `email`) VALUES ('1', '1', ENCRYPT('firstpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email1@example.com'), ('2', '1', ENCRYPT(

Is there an SHA224 implementation for .Net?

不问归期 提交于 2019-12-25 04:45:18
问题 Does .Net have a built-in implementation of SHA224 available for use or a way to get one of the existing .Net SHA implementations to do 224? I found this blog post which seems to suggest there isn't and won't be a Microsoft implementation of SHA224 so does anyone know of a good 3rd party implementation? Any solution that relies on P/Invoke is not acceptable as needs to be fully managed code as I need to support multiple platforms (.Net, Silverlight, Windows Phone and Mono) 回答1: Check out this

MySQL SHA2 function does not appear to work

久未见 提交于 2019-12-21 20:52:29
问题 I'm using MySql 5.5.32 and trying to reproduce some code in a stored procedure that we have in the business layer so I can set passwords for people using sql . It appears that there is something wrong with the SHA2 function though, but maybe I'm missing something: SELECT length(SHA2("bob", 512)) Returns 128. Shouldn't it be 64? SELECT length(SHA2("bob", 256)) Which returns 64, so it appears that either I missing something, or there is a bug in SHA2. Any ideas? 回答1: I coded the patch for the

Hashing a password using SHA256 and .NET/Node.js

妖精的绣舞 提交于 2019-12-18 03:56:39
问题 Im Storing SHA256 hashes of user passwords in my database generated by .NET and I need to be able to check them with Node.js. The only problem is that .NET and Node.js create different hashes for the same password. Password: ThisPassword .NET: var ue = new UnicodeEncoding(); var byteSourceText = ue.GetBytes("ThisPassword"); var byteHash = new System.Security.Cryptography.SHA256Managed().ComputeHash(byteSourceText); return Convert.ToBase64String(byteHash); //Tlwxyd7HIQhXkN6DrWJtmB9Ag2fz84P

what can be used to find the sha2 checksum of a file in windows

天大地大妈咪最大 提交于 2019-12-13 07:59:20
问题 What is the best method for getting a SHA2 checksum in windows? I'm looking for something equivalent to md5sums-1.2 utility referenced for putty downloads, with more options than just md5. Edit - after more searching it seems only sha1 sha256 sha512 have working programs for anything outside of hashing text. I want to find the sha2 checksum of a file, is this no dice yet due to sha2 recently becoming popular? 回答1: You can install 7-zip 15.14 or later - one of the new features (optionally)

Matching Java SHA2 Output vs MySQL SHA2 Output

ⅰ亾dé卋堺 提交于 2019-12-09 07:20:21
问题 When I reproduce a SHA2 hash via the following code: MessageDigest digest = MessageDigest.getInstance("SHA-256"); digest.digest("A".getBytes("UTF-8")); it gives me a byte array, which is: 85,-102,-22,-48,-126,100,-43,121,93,57,9,113,-116,-35,5,-85,-44,-107,114,-24,79,-27,85,-112,-18,-13,26,-120,-96,-113,-33,-3 But when I reproduce same hash via MySQL it gives me a string which is: 5cfe2cddbb9940fb4d8505e25ea77e763a0077693dbb01b1a6aa94f2 How can I convert tha Java's result so that I can

What's the state of support for SHA-2 in various platforms?

被刻印的时光 ゝ 提交于 2019-12-07 02:39:56
问题 I read that SHA-1 is being retired from the FIPS 180-2 standard. Apparently there are weaknesses in SHA-1 that led to this decision. Can anyone elaborate on the basis for that decision? Are there implications for the use of SHA-1 in commercial applications? My real questions are: What is the state of SHA-2 support in various class libraries and platforms? Should I attempt to move to SHA-2 ? Interested in mainstream platforms: .NET, Java, C/C++, Python, Javascript, etc. 回答1: Sha1, Sha0, md4

Calculating a hash code for a large file in parallel

我的未来我决定 提交于 2019-12-05 20:19:40
问题 I would like to improve the performance of hashing large files, say for example in the tens of gigabytes in size. Normally, you sequentially hash the bytes of the files using a hash function (say, for example SHA-256, although I will most likely use Skein, so hashing will be slower when compared to the time it takes to read the file from a [fast] SSD). Let's call this Method 1. The idea is to hash multiple 1 MB blocks of the file in parallel on 8 CPUs and then hash the concatenated hashes