mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Refactor Utils.getSHA1 to produce SHA1 output instead of bool
This commit is contained in:
		
							parent
							
								
									70417d6a39
								
							
						
					
					
						commit
						d2982845ff
					
				
					 2 changed files with 43 additions and 2 deletions
				
			
		|  | @ -249,8 +249,12 @@ public  class       ShareActivity | |||
| 
 | ||||
|                 //FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template) | ||||
|                 // https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba | ||||
|                 boolean sha1Bool = Utils.testSHA1("801957214aba50cb63bb6eb1b0effa50188900ba", inputStream); | ||||
|                 Log.d(TAG, "SHA1Bool returns " + sha1Bool); | ||||
| 
 | ||||
|                 String fileSHA1 = Utils.getSHA1(inputStream); | ||||
|                 String debugSHA1 = "801957214aba50cb63bb6eb1b0effa50188900ba"; | ||||
| 
 | ||||
|                 boolean fileSHA1Found = fileSHA1.equals(debugSHA1); | ||||
|                 Log.d(TAG, "SHA1Bool returns " + fileSHA1Found); | ||||
| 
 | ||||
|             } catch (IOException e) { | ||||
|                 Log.d(TAG, "IO Exception: ", e); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan