• About
  • Privacy Poilicy
  • Disclaimer
  • Contact
CoinInsight
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining
No Result
View All Result
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining
No Result
View All Result
CoinInsight
No Result
View All Result
Home Bitcoin

sha256 – Bitcoin core code (27.99) HashWriter hex strings drawback

Coininsight by Coininsight
February 2, 2025
in Bitcoin
0
sha256 – Bitcoin core code (27.99) HashWriter hex strings drawback
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter

Related articles

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

October 19, 2025
Billionaire Tim Draper Leads $3.2M Seed Spherical for Ryder to Change Seed Phrases With TapSafe Restoration

Billionaire Tim Draper Leads $3.2M Seed Spherical for Ryder to Change Seed Phrases With TapSafe Restoration

October 19, 2025

I am engaged on an Altcoin, and I am getting totally different hashes for a similar hex string when hashed utilizing the HashWriter class of the bitcoin core code (27.99) and when hashed with the bcrypto lib of the JavaScript.

The difficulty is just with the hex strings, whereas numbers when hashed their hashes are matching and no issues (this proofs that the identical hashing algorithm is utilized in each bitcoin core code and the bcrypto lib in JS).


For numbers:

C++:

uint32_t timestamp = 1737835291;
HashWriter{} << st.timestamp).GetHash().GetHex(); // ends in (85b76e3a3eeff7da605b5de8349aaee931965d611fd903cb33146982e61cbb28)

JavaScript:

bcrypto.hash256(intToBytes(1737835291)).reverse().toString("hex"); // ends in (85b76e3a3eeff7da605b5de8349aaee931965d611fd903cb33146982e61cbb28)

For hex strings:

C++:

std::string hexString = "073ff90209cde3a9ce4ccd23598fd1b50e6a1fe34f30bd7240587f0bde6f65af";
(HashWriter{} << hexString ).GetHash().GetHex(); ends in (73e21e5a9038727c61aeee89c899bd45d7e935a306ede80388de131a99e14a75)

JavaScript:

bcrypto.hash256(Buffer.from("073ff90209cde3a9ce4ccd23598fd1b50e6a1fe34f30bd7240587f0bde6f65af", "hex")).reverse().toString("hex"); ends in (1ec6958d1fae90326d8abe7eb9950de366262ff80a730641a6acdac5dfc4ddfe) which is differs from the results of the C++

I’ve used a web based instrument to verify the hash of the hex (073ff90209cde3a9ce4ccd23598fd1b50e6a1fe34f30bd7240587f0bde6f65af) and received a end result that matches the results of the JavaScript (1ec6958d1fae90326d8abe7eb9950de366262ff80a730641a6acdac5dfc4ddfe)

I’ve additionally manipulated the hex strings encoding (hex, utf8/ascii) in each C++ and JavaScript and I could not discover a matching level between the resulted hashes of the 2 codes.

I’ve tried (Within the JavaScript code) to reverse the bytes of the hex string earlier than hashing it, and this ends in a unique hash however nonetheless not matching the C++ hash.


Why this occurring and the right way to get the identical hash of the hex string in each codes?

Thanks,,,

Tags: Bitcoincodecore..HashWriterhexproblemsha256strings
Share76Tweet47

Related Posts

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

by Coininsight
October 19, 2025
0

NEW YORK – October 17, 2025 – “UNBANKED,” an award-winning, feature-length Bitcoin documentary formally lands on Apple TV, Amazon Prime and Google...

Billionaire Tim Draper Leads $3.2M Seed Spherical for Ryder to Change Seed Phrases With TapSafe Restoration

Billionaire Tim Draper Leads $3.2M Seed Spherical for Ryder to Change Seed Phrases With TapSafe Restoration

by Coininsight
October 19, 2025
0

Singapore, Singapore, October 18th, 2025, Chainwirehttps://www.youtube.com/watch?v=_utODg4qi1oSingapore, Singapore, 17 October 2025 — Ryder, the corporate behind the simplest to make use...

Ripple Plans $1B XRP Treasury, Buys GTreasury For $1B

Ripple Plans $1B XRP Treasury, Buys GTreasury For $1B

by Coininsight
October 18, 2025
0

Be part of Our Telegram channel to remain updated on breaking information protection Ripple is reportedly in search of to...

DOGE Worth Breaks Key Assist: Is Alt Run No Extra?

DOGE Worth Breaks Key Assist: Is Alt Run No Extra?

by Coininsight
October 18, 2025
0

DOGE Worth is seeing some not so fairly motion recently. It broke LTF construction, however what are the implications? Are...

Bitcoin Whale Who Nailed The Crash Is Now Dropping Huge: $10M in The Purple On BTC And ETH Longs

Bitcoin Whale Who Nailed The Crash Is Now Dropping Huge: $10M in The Purple On BTC And ETH Longs

by Coininsight
October 18, 2025
0

Trusted Editorial content material, reviewed by main business consultants and seasoned editors. Advert Disclosure Bitcoin continues to wrestle beneath bearish...

Load More
  • Trending
  • Comments
  • Latest
MetaMask Launches An NFT Reward Program – Right here’s Extra Data..

MetaMask Launches An NFT Reward Program – Right here’s Extra Data..

July 24, 2025
BitHub 77-Bit token airdrop information

BitHub 77-Bit token airdrop information

February 6, 2025
Haedal token airdrop information

Haedal token airdrop information

April 24, 2025
MilkyWay ($milkTIA, $MILK) Token Airdrop Information

MilkyWay ($milkTIA, $MILK) Token Airdrop Information

March 4, 2025
Kuwait bans Bitcoin mining over power issues and authorized violations

Kuwait bans Bitcoin mining over power issues and authorized violations

2
The Ethereum Basis’s Imaginative and prescient | Ethereum Basis Weblog

The Ethereum Basis’s Imaginative and prescient | Ethereum Basis Weblog

2
Unchained Launches Multi-Million Greenback Bitcoin Legacy Mission

Unchained Launches Multi-Million Greenback Bitcoin Legacy Mission

1
Earnings Preview: Microsoft anticipated to report larger Q3 income, revenue

Earnings Preview: Microsoft anticipated to report larger Q3 income, revenue

1
EcoVadis Launches Nameless Reporting Device for Provide Chain Staff

EcoVadis Launches Nameless Reporting Device for Provide Chain Staff

October 19, 2025
“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

October 19, 2025
WF Holding Ltd Skyrockets as It Dives into Crypto and China Enlargement

SS Tech (GWH) Explodes Over 30% on $40 Million Funding Lifeline – Why This May Supercharge the Clear Vitality Push

October 19, 2025
BitMine boosts Ethereum holdings to 2.5% of whole ETH provide in strategic dip-buying spree

BitMine boosts Ethereum holdings to 2.5% of whole ETH provide in strategic dip-buying spree

October 19, 2025

CoinInight

Welcome to CoinInsight.co.uk – your trusted source for all things cryptocurrency! We are passionate about educating and informing our audience on the rapidly evolving world of digital assets, blockchain technology, and the future of finance.

Categories

  • Bitcoin
  • Blockchain
  • Crypto Mining
  • Ethereum
  • Future of Crypto
  • Market
  • Regulation
  • Ripple

Recent News

EcoVadis Launches Nameless Reporting Device for Provide Chain Staff

EcoVadis Launches Nameless Reporting Device for Provide Chain Staff

October 19, 2025
“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

“UNBANKED” Documentary To Premiere On Apple TV, Amazon Prime, Google TV On Anniversary Of Bitcoin White Paper

October 19, 2025
  • About
  • Privacy Poilicy
  • Disclaimer
  • Contact

© 2025- https://coininsight.co.uk/ - All Rights Reserved

No Result
View All Result
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining

© 2025- https://coininsight.co.uk/ - All Rights Reserved

Social Media Auto Publish Powered By : XYZScripts.com
Verified by MonsterInsights