Example usage for javax.security.auth.x500 X500Principal hashCode

List of usage examples for javax.security.auth.x500 X500Principal hashCode

Introduction

In this page you can find the example usage for javax.security.auth.x500 X500Principal hashCode.

Prototype

public int hashCode() 

Source Link

Document

Return a hash code for this X500Principal .

Usage

From source file:ca.nrc.cadc.cred.server.CertificateDAO.java

public X509CertificateChain get(X500Principal principal) {
    if (principal == null)
        return null;
    String canonizedDn = AuthenticationUtil.canonizeDistinguishedName(principal.getName());
    X500Principal p = new X500Principal(canonizedDn);
    String hashKey = Integer.toString(p.hashCode());
    return get(hashKey);
}