mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Add sha1Bool test with mock SHA1
This commit is contained in:
		
							parent
							
								
									03f207db16
								
							
						
					
					
						commit
						16877eca27
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -31,6 +31,7 @@ import java.util.List; | |||
| import fr.free.nrw.commons.CommonsApplication; | ||||
| import fr.free.nrw.commons.EventLog; | ||||
| import fr.free.nrw.commons.R; | ||||
| import fr.free.nrw.commons.Utils; | ||||
| import fr.free.nrw.commons.auth.AuthenticatedActivity; | ||||
| import fr.free.nrw.commons.auth.WikiAccountAuthenticator; | ||||
| import fr.free.nrw.commons.category.CategorizationFragment; | ||||
|  | @ -241,9 +242,14 @@ public  class       ShareActivity | |||
|             mediaUriString = mediaUri.toString(); | ||||
|             ImageLoader.getInstance().displayImage(mediaUriString, backgroundImageView); | ||||
| 
 | ||||
|             //Test SHA1 of image | ||||
|             try { | ||||
|                 InputStream inputStream = getContentResolver().openInputStream(mediaUri); | ||||
|                 Log.d(TAG, "Input stream created from " + mediaUriString); | ||||
| 
 | ||||
|                 boolean sha1Bool = Utils.testSHA1("801957214aba50cb63bb6eb1b0effa50188900ba", inputStream); | ||||
|                 Log.d(TAG, "SHA1Bool returns " + sha1Bool); | ||||
| 
 | ||||
|             } catch (IOException e) { | ||||
|                 Log.d(TAG, "IO Exception: ", e); | ||||
|             } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 misaochan
						misaochan