Generating an address from a private key in Java? 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
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.