No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
LoadCerV1
gradle/wrapper
.gitignore
README.md
build.gradle
cerload.jks
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Android-Load_Certificate_Digital

 File file = new File(path);
            KeyStore p12 = KeyStore.getInstance("pkcs12");
            p12.load(new FileInputStream(file), editPassword.getText().toString().toCharArray());
            Enumeration e = p12.aliases();
            while (e.hasMoreElements()) {
                String alias = (String) e.nextElement();
                X509Certificate c = (X509Certificate) p12.getCertificate(alias);
                Principal subject = c.getSubjectDN();
                String subjectArray[] = subject.toString().split(",");
                for (String s : subjectArray) {
                    String[] str = s.trim().split("=");
                    String key = str[0];
                    String value = str[1];
                    System.out.println(key + " - " + value);
                    System.out.println("key "+key);
                    Log.e("data",value);
                    txtResult.setText(txtResult.getText()+"\n"+key+" "+value);
                }
            }

alt tag