sha1

Android Firebase Dynamic Links setup - SHA-1 not recognized

家住魔仙堡 提交于 2019-11-29 17:54:09
i am trying to setup my android app to use firebase dynamic links and am experiencing a problem in setting it up in the firebase console. i had previously added my app to my firebase project to use the realtime database and it works with no isssues. i included the app's debug SHA-1 (which i obtained from the app-debug.apk). now in the firebase dynamic links console screen, i can select my app from the drop-down list but it shows a warning in red "Please add SHA-1 for this Android app". i even deleted the app from my firebase project and then added it again, also including the SHA-1 but i still

Firebase Sign In: GoogleSignIn onActivityResult() returns RESULT_CANCELED with Result error 12500

扶醉桌前 提交于 2019-11-29 17:36:34
Ok, i am aware that this question has been asked multiple times, but for some reason this error keeps happening, this is the scenario: Created PROD firebase project, inserted google-services.json within Android project (Android project path: app/google-services.json) that is working perfectly, contains: Two SHA1 keys - from .android/debug.keystore (for now) and custom release keystore (2 Oauth2 Android Client ID's based on those keys) Oauth2 Web Client ID that is used for Google Sign In - I've put them into Firebase Console/Authentication/Providers/Google Sign In/Web SDK Configuration Firebase

Testing if string is sha1 in PHP

左心房为你撑大大i 提交于 2019-11-29 17:15:55
问题 I'm planning on storing the passwords as a sha1, so I need a way to validate that it is a sha1 at another point in my website. I was planning on using preg_match, but I do not know how to make regex patterns. Could someone help me out with one? Thanks Edit: I am not trying to see if two hashes match. 回答1: Actually, you can use preg_match() to make sure it's a 40 characters hexadecimal string as such: function is_sha1($str) { return (bool) preg_match('/^[0-9a-f]{40}$/i', $str); } To explain

Python hmac and C# hmac

心不动则不痛 提交于 2019-11-29 15:16:54
问题 We have a python web service. It needs a hash as a parameter. The hash in python is generated this way. hashed_data = hmac.new("ant", "bat", hashlib.sha1) print hashed_data.hexdigest() Now, this is how I generate the hash from C#. ASCIIEncoding encoder = new ASCIIEncoding(); Byte[] code = encoder.GetBytes("ant"); HMACSHA1 hmSha1 = new HMACSHA1(code); Byte[] hashMe = encoder.GetBytes("bat"); Byte[] hmBytes = hmSha1.ComputeHash(hashMe); Console.WriteLine(Convert.ToBase64String(hmBytes));

How to obtain the RevCommit or ObjectId from a SHA1 ID string with JGit?

跟風遠走 提交于 2019-11-29 13:32:51
This question is the inverse of this question: JGit how do i get the SHA1 from a RevCommit? . If I am given the SHA1 ID of a particular commit as a string, how can I obtain the ObjectId or associated RevCommit in JGit? Here is a possible answer, which iterates through all RevCommit s: RevCommit findCommit(String SHAId) { Iterable<RevCommit> commits = git_.log().call(); for (RevCommit commit: commits) { if (commit.getName().equals(SHAId)) return commit; } return null; } Is there anything better than this implementation above? It is probably easier to first convert the string into an ObjectId

在flutter中使用高德地图

女生的网名这么多〃 提交于 2019-11-29 12:05:32
1. 配置Android原生文件,在如下文件中的application中添加如下内容 2. 配置高德地图的sha1   2.1在Android studio中打开原生Android窗口   2.2. 找到sha1:双击signingReport即可获取   2.3 来源: https://www.cnblogs.com/xhrr/p/11420148.html

Python HMAC-SHA1 vs Java HMAC-SHA1 different results

纵饮孤独 提交于 2019-11-29 11:11:23
I borrowed the HMAC-SHA1 Java code from http://tools.ietf.org/html/rfc6238 and adapted slightly to hardcode it to use one known key/message pair with known output. I then tried to write the same code in Python to verify the results, however I'm getting different values in Python and Java. The Java values are known to be good. Java code: import java.lang.reflect.UndeclaredThrowableException; import java.security.GeneralSecurityException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import

SHA1 Plain text? C#.NET

不羁岁月 提交于 2019-11-29 10:38:59
I am using C# and calculating SHA1 for a string. My question is that will this always produce plain text 0-1 and A-Z ? Or it will produce has with special characters too ? I mean is ComputeHash function here will return always plain text ? SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider(); string receivedValue = BitConverter.ToString(sha1.ComputeHash(to_be_hash)).Replace("-", ""); Not sure but I think it should generate special character only if its converted to Base 64 . It's a hex string, so only 0-9 and A-F. Actually it's just a byte array, but you use the string BitConverter

bugku | 各种绕过

为君一笑 提交于 2019-11-29 10:35:18
<?php highlight_file('flag.php'); $_GET['id'] = urldecode($_GET['id']); $flag = 'flag{xxxxxxxxxxxxxxxxxx}'; if (isset($_GET['uname']) and isset($_POST['passwd'])) { if ($_GET['uname'] == $_POST['passwd']) print 'passwd can not be uname.'; else if (sha1($_GET['uname']) === sha1($_POST['passwd'])&($_GET['id']=='margin')) die('Flag: '.$flag); else print 'sorry!'; } ?> 一个走心的payload: GET: id=%6d%61%72%67%69%6e&uname[]=1POST: passwd[]=2 一个草率的解析: 一开始是想到:sha1()之后的值,是‘0e’开头的会变成科学记数法,然后结果都是为0,但是没想到后面还有一个‘&’ 利用数组的话,会报 “ Warning: sha1() expects parameter 1 to be string, array given in /usercode/file.php

Your Operation was forbidden issue in Firebase Console

ぃ、小莉子 提交于 2019-11-29 09:07:16
I created an Android Project. Now I want to add Firebase into my android project. I register my application on firebase console. Now When I try to add my sha-1 key in to project it gives me following error. I search on google and stackoverflow but didn't receive any proper answer. According to some answers this error occurs when I insert same sha-1 key in to another project of firebase. Let me tell you that this is my only project in firebase console. I do not have any other project in this firebase account. So what could be the problem and how can I add this sha-1 in my firebase project ?