public byte[] generate64BitHashId() throws CryptoException {
  try {
    DERBitString publicKeyBitString=encodePublicKeyAsBitString(publicKey);
    byte[] hash=DigestUtil.getMessageDigest(publicKeyBitString.getBytes(),DigestType.SHA1);
    byte[] subHash=Arrays.copyOfRange(hash,12,20);
    subHash[0]&=0x0F;
    subHash[0]|=0x40;
    return subHash;
  }
 catch (  IOException ex) {
    throw new CryptoException(res.getString("NoGenerateKeyIdentifier.exception.message"),ex);
  }
}

public byte [ ] generate64BitHashId ( ) throws CryptoException { try { DERBitString publicKeyBitString = encodePublicKeyAsBitString ( publicKey ) ; byte [ ] hash = DigestUtil . getMessageDigest ( publicKeyBitString . getBytes ( ) , DigestType . SHA1 ) ; byte [ ] subHash = Arrays . copyOfRange ( hash , 12 , 20 ) ; subHash [ 0 ] &= 0x0F ; subHash [ 0 ] |= 0x40 ; return subHash ; } catch ( IOException ex ) { throw new CryptoException ( res . getString ( "NoGenerateKeyIdentifier.exception.message" ) , ex ) ; } }
generate 64 bit hash key identifier .
