FAQ Database Discussion Community


Making all possible 6 digit combinations of digits and alphabets

python,hash,sha1,itertools,brute-force
I am trying to do a brute force on one hash key i have , key is 28 bit and i have to find password which is 6 digit and includes 0-9 and a-z like 36 total possibilities for each place. I am using macbook with 16gb of ram but...

Trying to convert C# SHA1 digest code to Ruby [closed]

c#,ruby-on-rails,ruby,sha1
I'm trying to recreate the following lines of C# code in Ruby. I'm not familiar with Digest and C# that's why I need help with this. byte[] data = System.Text.Encoding.ASCII.GetBytes(message); System.Security.Cryptography.SHA1 sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider(); byte[] result = sha1.ComputeHash(data); System.Text.StringBuilder sb = new System.Text.StringBuilder(); for(int i=0; i<result.Length; i++) { sb.Append(result[i].ToString("X2"));...

port sha-1 hash from C# to Android/java

java,c#,android,sha1
I need to port the following code from C# private string hashcode(string code) { byte[] bytes = Encoding.Unicode.GetBytes(code); byte[] inArray = HashAlgorithm.Create("SHA1").ComputeHash(bytes); return Convert.ToBase64String(inArray); } to an Android App. I have this in Java: private static String hashCode(String userCode) { String hashSha1; MessageDigest digest = null; try { digest =...

Regex for git commit (SHA1) inside or not a markdown link

javascript,regex,git,sha1
I want to parse a line having the word Commits (case insensitive) followed by a colon, a possible space and either two commits hash separated by three dots or the same included in a markdown link. For example, for the following lines: commits:56af25a...d3fead4 Commits: [56af25a...d3fead4](https://github.com/Glimpse/Semantic-Release-Notes/compare/56af25a...d3fead4) I want to get: 56af25a...d3fead4...

Difference between Sha1WithRSA and Sha1WithRSAEncryption?

java,rsa,digital-signature,sha1,public-key-encryption
I've noticed these two algorithms that have different names, but functionally sound very similar. When I looked further, I've found out Sha1WithRSA is available across many Security Providers, but Sha1WithRSAEncryption is only available if I use the BouncyCastle Provider. Example: JcaContentSignerBuilder("SHA1WithRSAEncryption").setProvider("BC") Is it replacable with JcaContentSignerBuilder("SHA1WithRSA").setProvider("SunJSSE") ? Can someone throw...

How to convert SHA1 to array[5] of unsigned long ints?

c++,arrays,converter,sha1,unsigned-integer
For the purposes of library/subsystem that I use I have to convert SHA1 (calculated with use of e.g. opensll) to 5 element array of unsigned long ints (32 bits variables) or create the aforementioned SHA1-5-long-array by myself. Reason: SHA1 (160 bits) = 5 x unsigned long int (32 bits) I...

Different sha1 hashes calculated in PHP vs Node.js

php,node.js,sha1
Any ideas why the following snippets of code generate different hash values? I'm concatenating the contents of a file and the filename before generating the hash. My goal is to make the Node code generate the same sha1 hash as the PHP code below. PHP code: $filename = 'picture.jpg'; $filecontent...

Laravel 5: Using SHA1 instead of Bcrypt

php,laravel,sha1,laravel-5,extending
I'm trying to extend the default Bcrypt HashServiceProvider in laravel 5, to make use of the SHA1 encryption instead. Using the answer from this question: How to use SHA1 encryption instead of BCrypt in Laravel 4? and the official documentation at http://laravel.com/docs/5.0/extending#container-based-extension, I'v managed to cook up the following code:...

What is the most significant byte of 160 bit hash for arithmetic operations?

c#,.net,sha1,dht,byte-order
Could somebody help me to understand what is the most significant byte of a 160 bit (SHA-1) hash? I have a C# code which calls the cryptography library to calculate a hash code from a data stream. In the result I get a 20 byte C# array. Then I calculate...

Issues with using SHA1 password encryption in PHP/mysql

php,mysql,encryption,phpmyadmin,sha1
I have a simple script for user login. I have the passwords encrypted as SHA1 in mySQL database table (using charset utf8_unicode_ci). When I run "$q" in the database with values it returns result all right. But through the script even after entering correct credentials, I am not able to...

Calling .NET Cryptography from VBA

vba,cryptography,sha1
I am trying to generate an SHA-1 hash in VBA (which I am not very familiar with). In .NET it is pretty straightforward, using System.Security.Cryptography. One method is as follows: using System.Security.Cryptography; ... byte[] data; // fill data here SHA1Managed sha = new SHA1Managed(); bytes[] hash = sha.ComputeHash(data); How would...

Does CopyTo store the whole thing in memory?

c#,zip,sha1
I have the following code snippet, which is designed to add files to a .zip file, while at the same time calculating their sha1 checksum. However, it's running out of memory on large files. Which part of it is causing the whole file to be in memory? Surely this should...

How to get (only) author name or email in git given SHA1?

git,commit,sha1,author
I would like to check for author's e-mail and name, surname to verify who's pushing to my repo. Is there any way that I can come up with a command in git to show commiter's name/e-mail given only SHA1 of the commit? This is what I came up with but...

SHA1 for Google apis

android,google-api,sha1,android-googleapiclient
Im a bit confused about how to obtain the SHA1 for my app. I saw all the guides which suggest: keytool -list -v -keystore C:\Users\user\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android But when i sign my app for distribution on Google play i sign it with a key (by applying...

Windows PHP Replacing SHA1_FILE >= 2GB error fix

php,windows,sha1
So for those who do not know PHP both 64bit and 32bit builds for windows have a design limitation what means functions like "filesize", "md5_file", "sha1_file" etc. Can not read files over the size of 2GB and the php script shall error or return a invalid/incorrect size for the file....

Chance of a duplicate hash when using first 8 characters of SHA1

math,probability,sha1,hash-collision
If I have an index of URLs, and ID them by the first 8 characters of a SHA1 hash, what is the probability of two different URLs having identical IDs?

SSL certificate error 403.13 in IIS 7.5

internet-explorer,iis-7,ssl-certificate,sha1,http-status-code-403
I'm getting 403.13 in IIS logs, when I'm trying to access my api using the created certificate(sha1). Further I tested the same certificate in other test environment it works treat and I get the the XML from the api without any issue. Certificate pfx is installed in Certificate store and...

Get SHA1 fingerprint certificate in Android Studio for Google Maps

android,osx,google-maps,sha1
I want to get the SHA1 key from Android Studio on a Mac. From Eclipse it's simple, but I can't get this in Android Studio. I have checked similar questions but didn't get any way to get that in MAC. The SHA1 is different for signed and unsigned APK. Please...

Update to already published game on Google Play giving error with SHA1 key

android,eclipse,google-play-services,sha1,google-play-games
I have a problem with my already published game at Google Play Store. In my first published game I have not used any Google APIs. But in my next update I have used Google Play Game Services. Now I have uploaded updated APK for Alpha testing. When I have downloaded...

Attempting to use SHA1 hashing to send password to Google

c#,encryption,sha1,google-directory-api
I am currently working on a program with Google's Directory API to reset the password of someone in my domain. I have it all working, but I would like to send an encrypted password to Google instead of plaintext. Since the API seems limited in what I can use to...

Non Hex Based hash Code

hash,md5,sha1
to make long story short. I was given a Hash code generated from a file, but was not told what kind of function it was generated with. The Hash code was: "IRV4RRFX3Q62YIXLBJMEXANLDE3JPVFT" If i was right in could not be MD5 or sha1 because these are Hex based driven, so...

Generate the password hash using php

php,encryption,passwords,sha1,silverstripe
i have a DB of users and their password in encrypted form. I want to let the users log in to the site using the username and password. For authentication i need to know what type of encryption is their so that i can match the entered password with the...

How do i encrypt password in three layers , SHA1, base64 encode and salt

java,base64,sha1,salt,password-encryption
I want to encrypt and decrypt password with high security . First, the string password with be converted to SHA1 , then i also want to add base64 encode and lastly add SALT to it. Is this doable in java? I have sample code to encode in base64 and sha1...

How can I create a keystore starting from an existing fingerprint?

android,sha1,fingerprint,android-keystore
I want to upload in the Playstore my app that will replace an older version that i have not loaded by myself in past. I have the following error when i try to upload my app: You uploaded an APK that is signed with a certificate other than that of...

SHA1 generate with range in terminal

sha1
Im trying to generate SHA1 hashes for a specified numeric range on terminal I tried this for i in {1..100};do echo -n i(which ever word) | shasum -a 1 | awk '{print $1}'; Doesnt seem to be working ...

How to increment the value of an unsigned char * (C)

c++,c,openssl,byte,sha1
I have a value stored as an unsigned char * (in C). This holds the SHA1 hash of a string. My goal is to cover the SHA1 key space. Since I'm using <openssl/evp.h> to generate the hashes, I end up with an unsigned char* holding the SHA1 value. Now I...

Undefined reference to `SHA1'

c,windows,openssl,codeblocks,sha1
I'm posting here due to a problem with Code::Blocks I've recently created a project in linux which compiled and executed correctly. Now I am trying to made it work on windows. Problem When I tried to compile thanks to Code::Blocks I received the error : C:\Users\PC\Desktop\Collector\verification.c |44|undefined reference to `SHA1'|...