android: compare hashes of certificate
===

I want to compare inside my app my certificates hash to the one I get from the packagemanager using

    Signature sigs[] = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES).signatures;
      
       boolean signsAreValid = sigs[0].hashCode() == myHash;

where myHash is the hashCode of my SHA Signature

But for some reasons they never match. What am I doing wrong?