Joke Collection Website - Blessing messages - How does autojs view the signature password?
How does autojs view the signature password?
*/functiongetcertificatesha1fingerprint () {//Get the package manager letpm = context. Getpackagemanager()// Get the name of the SHA package currently to be obtained. Other package names can also be used, but it should be noted that//the premise of using other package names is that the parameter Context passed by this method should be the corresponding package tpackagename = context. getpackagename (); //Returns signature information letflags = packagemanager. Get the _ signatures// contained in the package and get all the content information classes of the package, so that packageinfo =. getpackageinfo(package name,flags); //signature information let signatures = packageinfo. Signature; Etcert = signature [0]. ToByteArray()// Converts the name into a byte array stream, EtinpenetTelerayInputStream (CERT); //certificate factory class, which realizes the function of factory certificate algorithm and makes cf = certificatefactory. getinstance(“x509“); //X509 certificate, X.509 is a very common certificate format let c = cf.generate certificate (input); //Encryption algorithm class, in which parameters can make encryption algorithms such as MD4 and MD5 let MD = messagedigest. getinstance(“sha 1“); //get the public key let public key = md.digest (c.getencoded ()); //Format conversion from byte to hexadecimal Let Hexstring = Byte2Hexformatted (public key); Returns hexString// Here is the function Byte2HexFormed (arr), which is used to convert the obtained code into16 {let str = New StringBuilder (arr. Length * 2); For (let I = 0;; I 2)h = h . substring(l-2,l); str . append(h . toupper case()if(I
- Previous article:May 1 ST planning activity plan in 2022
- Next article:What if Huawei Glory 8 can't recognize the SIM card and can't surf the Internet?
- Related articles
- Is there a difference between Wechat deletion and withdrawal?
- The Mid-Autumn Festival classical Chinese blessing given by the company to employees
- Xinjiang national unity short message
- What should I pay attention to when ordering a banquet?
- How to close Huawei's collection?
- Why is the mailbox 163 returned?
- Mobile phone can't receive CCB SMS verification code.
- Wish myself Christmas Eve greetings.
- Warm greetings on New Year's Eve.
- Do users who send SMS messages to other operators have SMS receipt?