Code example for Certificate

Methods: hashCode

0
  } 
 
  public synchronized void storeCertificate(Certificate peerCert) {
    try { 
      String alias = String.format(
          KeyStoreManager.REMOTE_IDENTITY_ALIAS_PATTERN, peerCert.hashCode());
      if (mKeyStore.containsAlias(alias)) {
        Log.w(LOG_TAG, "Deleting existing entry for " + alias);
        mKeyStore.deleteEntry(alias);
      } 
      Log.i(LOG_TAG, "Adding cert to keystore: " + alias);
      mKeyStore.setCertificateEntry(alias, peerCert);
      store(); 
    } catch (KeyStoreException e) {
      Log.e(LOG_TAG, "Storing cert failed", e);
    } 
  } 
 
  private void clearKeyStore() { 
    try {