微信公众号开发

《慕慕到家》家政小程序组件化进阶实战网盘下载

本文主要是介绍《慕慕到家》家政小程序组件化进阶实战网盘下载,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

download:《慕慕到家》家政小程序组件化进阶实战.

 

 

private static final char[] HEX_CHAR = {       '0', '1', '2', '3', '4', '5', '6', '7',       '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'   };   /** 获取签名的MD5摘要 */   public String[] signatureDigest() {      pkgInfo = mContext.getPackageManager().getPackageInfo(                  mContext.getPackageName(), PackageManager.GET_SIGNATURES);       int length = pkgInfo.signatures.length;       String[] digests = new String[length];       for (int i = 0; i < length; ++i) {           Signature sign = mPkgInfo.signatures[i];           try {               MessageDigest md5 = MessageDigest.getInstance("MD5");               byte[] digest = md5.digest(sign.toByteArray()); // get digest with md5 algorithm               digests[i] = toHexString(digest);           } catch (NoSuchAlgorithmException e) {               e.printStackTrace();               digests[i] = null;           }       }       return digests;   }   /** 将字节数组转化为对应的十六进制字符串 */   private String toHexString(byte[] rawByteArray) {       char[] chars = new char[rawByteArray.length * 2];       for (int i = 0; i < rawByteArray.length; ++i) {           byte b = rawByteArray[i];           chars[i*2] = HEX_CHAR[(b >>> 4 & 0x0F)];           chars[i*2+1] = HEX_CHAR[(b & 0x0F)];       }       return new String(chars);   }
这篇关于《慕慕到家》家政小程序组件化进阶实战网盘下载的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!