키스토어 정보 가져오기


맥에선 터미널, 윈도우에선 cmd

keytool -list -v -keystore ~/.android/debug.keystore -alias AndroidDebugKey


keytool -list -v -keystore /Users/jjj/jjj/jjj/android/jjj/jjj.jks -alias keystorename




윈도우도 같은 식으로 하면됨


keytool -list -v -keystore [풀경로] -alias 키스토어이름








키해시 가져올 소스 - 페이스북에서 요구함

public static String printKeyHash(Activity context) {

PackageInfo packageInfo;
String key = null;
try {
//getting application package name, as defined in manifest
String packageName = context.getApplicationContext().getPackageName();

//Retriving package info
packageInfo = context.getPackageManager().getPackageInfo(packageName,
PackageManager.GET_SIGNATURES);

Log.e("Package Name=", context.getApplicationContext().getPackageName());

for (Signature signature : packageInfo.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
key = new String(Base64.encode(md.digest(), 0));

// String key = new String(Base64.encodeBytes(md.digest()));
Log.e("Key Hash=", key);
}
} catch (PackageManager.NameNotFoundException e1) {
Log.e("Name not found", e1.toString());
}
catch (NoSuchAlgorithmException e) {
Log.e("No such an algorithm", e.toString());
} catch (Exception e) {
Log.e("Exception", e.toString());
}



return key;
}






+ Recent posts