Created
January 29, 2019 19:06
-
-
Save soaresdiogo/fa5682025f1e0f8f0834e652eca3f979 to your computer and use it in GitHub Desktop.
Generate Hash to MANIFEST.MF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileStream fs = new FileStream(@"/index-v1.json", FileMode.Open); | |
using (BinaryReader s = new BinaryReader(fs)) | |
{ | |
byte[] bytes = new byte[50 * 1024]; | |
string hashBase64 = ParseToSha1(bytes); | |
Debug.WriteLine("index-v1.json: " + hashBase64); | |
} | |
//Or by text | |
StringBuilder sb = new StringBuilder(); | |
sb.Append("Name: index-v1.json"); | |
sb.Append(Environment.NewLine); | |
sb.Append("SHA1-Digest: +nfT/Wz3YmkX+lNO5MHJ1LM01oQ="); | |
sb.Append(Environment.NewLine); | |
sb.Append(Environment.NewLine); | |
Debug.WriteLine("Line 7 FDROID-3.SF: " + ParseToSha1(Encoding.ASCII.GetBytes(sb.ToString()))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment