user11591: I'd like to write a function in Java that takes a private key and generates the address to use in a QR code. I'd like to make this , but I'm not very good with the hashing algorithms.
I've checked with https://www.bitaddress.org and what is generated on there is not the same as what I'm getting in my program.
Can anyone help me with this? Google has failed me

user9175: Don't reinvent the wheel, use an existing library. bitcoinj for instance provides the method getPubKeyHash of the class ECKey which does what you are looking for.
Edit: getPubKeyHash does not return the human readable address directly, but can be used to create an instance of the class Address. This (as a subclass of VersionedChecksummedBytes) has in turn the method toString which presents the hash as bitcoin address.

11591: <p>I'd like to write a function in Java that takes a private key and generates the address to use in a QR code. I'd like to make this , but I'm not very good with the hashing algorithms.</p>

<p>I've checked with <a href="https://www.bitaddress.org" rel="noreferrer">https://www.bitaddress.org</a> and what is generated on there is not the same as what I'm getting in my program.</p>

<p>Can anyone help me with this? Google has failed me</p>
 9175: <p>Don't reinvent the wheel, use an existing library. <a href="https://code.google.com/p/bitcoinj/" rel="nofollow">bitcoinj</a> for instance provides the method <code>getPubKeyHash</code> of the class <code>ECKey</code> which does what you are looking for.</p>

<p><strong>Edit</strong>: <code>getPubKeyHash</code> does not return the human readable address directly, but can be used to create an instance of the class <code>Address</code>. This (as a subclass of <code>VersionedChecksummedBytes</code>) has in turn the method <code>toString</code> which presents the hash as bitcoin address.</p>
