Dear Antonio,
Are there any plans to incorporate Blockchain initiatives in to FWH?
Thank you,
The hash of the previous block must be found in the block to preserve the chain integrity
function Main()
local aBlocks := { { 1, "first", 0 },;
{ 2, "second", 0 },;
{ 3, "third", 0 },;
{ 4, "fourth", 0 },;
{ 5, "fifth", 0 } }
AEval( aBlocks, { | aBlock, n | If( n > 1,;
aBlock[ 3 ] := hb_HMAC_SHA256( aBlocks[ n - 1 ][ 2 ],;
aBlocks[ n - 1 ][ 3 ] ),) } )
aBlocks[ 3 ][ 2 ] = "changed!"
AEval( aBlocks, { | aBlock, n | If( n > 1,;
If( aBlock[ 3 ] != hb_HMAC_SHA256( aBlocks[ n - 1 ][ 2 ],;
aBlocks[ n - 1 ][ 3 ] ),;
MsgInfo( "blockchain modified at " + AllTrim( Str( n - 1 ) ) + ;
"element" ), ), ) } )
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 67 guests