public byte[] generate160BitHashId() throws CryptoException {
  try {
    DERBitString publicKeyBitString=encodePublicKeyAsBitString(publicKey);
    return DigestUtil.getMessageDigest(publicKeyBitString.getBytes(),DigestType.SHA1);
  }
 catch (  IOException ex) {
    throw new CryptoException(res.getString("NoGenerateKeyIdentifier.exception.message"),ex);
  }
}

public byte [ ] generate160BitHashId ( ) throws CryptoException { try { DERBitString publicKeyBitString = encodePublicKeyAsBitString ( publicKey ) ; return DigestUtil . getMessageDigest ( publicKeyBitString . getBytes ( ) , DigestType . SHA1 ) ; } catch ( IOException ex ) { throw new CryptoException ( res . getString ( "NoGenerateKeyIdentifier.exception.message" ) , ex ) ; } }
generate 160 bit hash key identifier .
