sha

How create SHA224SUM in java

拜拜、爱过 提交于 2019-12-04 14:43:22
问题 I need create hash from my string using analog Linux command SHA224SUM in java under Android. I try use: MessageDigest messageDigest224 = MessageDigest.getInstance( "SHA-224"); byte[] bSHA224 = messageDigest224.digest( "hello word".getBytes()); But I get error MessageDigest SHA-224 implementation not found java.security.NoSuchAlgorithmException: MessageDigest SHA-224 implementation not found SHA-512, SHA-1 algorithm work fine. Please get me link to analog SHA224 in Java. Please any ideas. 来源:

Are there any slow Javascript hashing algorithms like bcrypt?

我与影子孤独终老i 提交于 2019-12-04 10:02:05
I'm not talking about server-side node.js. I want to use a slow hashing algorithm for a key on the client-side of my site. I have found implementations of SHA-256 which seem to be reliable . I also found this question which lead to the OP creating his own library . However, I'm not sure if I should just do multiple rounds of SHA hashing or trust some of that code since I'm not a security expert and it doesn't seem to have a large following only being "stared" by 36 people. What is the best choice in this case? I (basically) cannot change methods once I choose something. I want a slow hashing

Fast hash function with collision possibility near SHA-1

China☆狼群 提交于 2019-12-04 02:10:05
I'm using SHA-1 to detect duplicates in a program handling files. It is not required to be cryptographic strong and may be reversible. I found this list of fast hash functions https://code.google.com/p/xxhash/ What do I choose if I want a faster function and collision on random data near to SHA-1? Maybe a 128 bit hash is good enough for file deduplication? (vs 160 bit sha-1) In my program the hash is calculated on chuncks from 0 - 512 KB. A. Binzxxxxxx Maybe this will help you: https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and

How does Apple's codesign utility decide which SHA algorithm(s) to sign a shared library with?

时间秒杀一切 提交于 2019-12-03 17:31:00
问题 First, a little background: I'm investigating why my company's MacOS/X application (which by all accounts appears to be correctly signed; it runs fine under MacOS/X 10.11.x and 10.12.x; Gatekeeper is fine with it on all MacOS versions; "spctl --assess", and "codesign -vvvv" all say it satisfies its requirement on all OS versions) nevertheless won't launch under OS/X 10.10.x -- under 10.10.x when I try to launch it, I get a Crash Report where dyld complains that some of the libraries aren't

Migrate passwords from Drupal 7 to Django

帅比萌擦擦* 提交于 2019-12-03 17:28:41
问题 I am migrating a site from Drupal 7 to Django 1.4, including the current users. How can I work with the passwords that were hashed by Drupal? According to this, Drupal 7 hashes passwords using SHA-512 (they are stored in the form of a string starting with "$S$"). Django 1.4 now contains a number of options for storing passwords, with a default of SHA-256, but I can't find an option for SHA-512. While this app appears to allow the use of SHA2 algorithms, I'm not sure it's compatible with

How to create serials key to protect an application

て烟熏妆下的殇ゞ 提交于 2019-12-03 16:13:18
I have an application that creates a serial key as follows: Take customername Sign customername using privatekey and sha/dsa algorithm Then license can be checked by decoding with public key, and checking cuastomername matches This works okay except that the generated serial is rather long. So it is not really practical for customer to type in the serial key instead they have to provide a serial with in a file, which is rather different to how mist applications and work and is confusing. Many other applications just provide the user with a Guid when they make a purchase i.e 5bd1060b-8608-4817

Build openssl with just RSA and AES

北城余情 提交于 2019-12-03 13:42:49
问题 I'm using libcrypto.a (OpenSSL) with a project. By default all the algorithms are available under libcrypto.a. For the project i just need RSA, AES and SHA. How I can build libcrypto.a with just those algorithms? 回答1: If you build OpenSSL by running the config or Configure script, you provide no-<cipher> as an argument to exclude the cipher. Run Configure with no options to see the available build options. The configuration script converts these arguments into options for the preprocessor.

Why does SHA1.ComputeHash fail under high load with many threads?

三世轮回 提交于 2019-12-03 12:33:28
I'm seeing an issue with some code I maintain. The code below has a private static SHA1 member (which is an IDisposable but since it's static , it should never get finalized). However, under stress this code throws an exception that suggests it has been closed: Caught exception. Safe handle has been closed" Stack trace: Call stack where exception was thrown at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) at System.Security.Cryptography.Utils.HashData(SafeHashHandle hHash, Byte[] data, Int32 cbData, Int32 ibStart, Int32 cbSize) at System.Security.Cryptography

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

☆樱花仙子☆ 提交于 2019-12-03 11:37:01
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 endianness issues and the fact that no implementations that I can find support feeding in single bits, I can't quite figure out what this correct value is. So, what is the correct hash of the 1-bit long input consisting of the bit "1"? (not the 8-bit long byte[] { 1 } input). OK, according to my own implementation: 1-bit string "1" : B9DEBF7D 52F36E64 68A54817

String SHA-512 Encoding: C# and JAVA result is different

拜拜、爱过 提交于 2019-12-03 09:57:37
问题 Im trying to compare two different string encoded by sha512. But, result is different. It can be an encode problem i mean. I hope you can help me. This is my Java code: MessageDigest digest = java.security.MessageDigest.getInstance("SHA-512"); digest.update(MyString.getBytes()); byte messageDigest[] = digest.digest(); // Create Hex String StringBuffer hexString = new StringBuffer(); for (int i = 0; i < messageDigest.length; i++) { String h = Integer.toHexString(0xFF & messageDigest[i]); while