It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
public static ECKey decodeBase58PK(String base58Priv) throws Exception {
byte[] privBytes = Base58.decode(base58Priv);
// Prepend a zero byte to make the biginteger unsigned
byte[] appendZeroByte = concat(new byte[1], privBytes);
ECKey ecKey = new ECKey(new BigInteger(appendZeroByte));
return ecKey;
}
/**
* Try to produce an ECKey Object from the given arguments.
* BCI has a very uncommon way of encoding the private key, its not the
* usual dumped private key format of the Satoshi client, its just base58 of
* the key bytes. Most importantly it is also lacking the information whether
* it is meant to produce a compressed or uncompressed public key. For this
* we try both and compare with the supplied bitcoin address, if none of
* them match (which should never happen) then this will throw an exception.
*
* @param base58Priv String containing the BCI encoded private key
* @param addr String containing the bitcoin address
* @return a new ECKey object representing this key
* @throws Exception if the input can not be interpreted in any meaningful way
*/
private def ECKey decodeBase58PK(String base58Priv, String addr) throws Exception {
val privBytes = Base58.decode(base58Priv);
var ecKey = new ECKey(new BigInteger(1, privBytes), null, false);
if (ecKey.toAddress(new MainNetParams).toString.equals(addr)){
log.debug("{} has uncompressed key", addr)
return ecKey;
} else {
ecKey = new ECKey(new BigInteger(1, privBytes), null, true);
if (ecKey.toAddress(new MainNetParams).toString.equals(addr)){
log.debug("{} has compressed key", addr)
return ecKey;
} else {
val err = addr + " and private key don't match, neither compressed nor uncompressed"
log.error(err)
throw new Exception(err)
}
}
}