vb.net has a nice little json library for it at
http://www.pozzware.com/pozzware/Corsi/Programmazione/VB.NET/JSON%20Library.aspxAsp has some too
http://code.google.com/p/aspjson/Server grabs the getwork json from the bitcoind, and passes it onto the client software. I'm building a sqlite back (because that's what I use, not berekelydb, sorry) and it tracks usage based on the bitcoin address for near hits.
.net already has the libraries needed for sha256
Imports System.Security.Cryptography
hash = New SHA256Managed()
Dim hashinBytes As Byte()
hashinBytes = hash.ComputeHash(hashhere)
What would I take from the getwork and toss inside there?
The basic mining algorithm looks like this: sha256(sha256(data)), where "data" is the "data" member returned by 'getwork' RPC.
However, one complication with standard sha256 library implementations is that they will byte-swap input data, to change the input data into big endian format, which is normally required for endian-neutral sha256 to work on all platforms.
To increase speed, bitcoin has already performed that byte-swapping for you.
Which means that, to use a standard library (.net or whatever) implementation of sha256, you need to byte-swap your data
again, to change it to little endian, then let your .net sha256 byte-swap back into big endian.
I'm looking at jgarzik's little c miner, and hash1, data, etc, those all are fine, but what is the hash variable he is passing in there as well?
'hash' is the output of sha256(sha256(data)), ie. the sha256 hash.