Jump to content

Search the Community

Showing results for tags 'endian'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • BlockForums Announcements
    • Denarius Announcements
  • Cryptocurrency Discussions
    • Cryptocurrencies
    • Altcoin Announcements
    • General Discussion
    • Tutorials & Help
  • Denarius Discussions
    • General Discussion
    • Tutorials & Help
    • Marketing & PR
    • Development
    • Mining & Staking
    • Trading & Exchanges
    • Marketplace
  • Programming & Design
    • Development QA
    • Design QA
  • Gaming
    • Bot Downloads & Discussion
    • Gaming Discussion
  • Classifieds
    • Buy Sell and Trade
  • Other Discussions
    • The Lounge
    • Hardware & IoT
    • Tutorials & Guides
    • Domains & Hosting

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


BTC Address

Found 2 results

  1. How to easily swap or change endianness in Javascript, NodeJS, etc. with one simple function! changeEndianness() const changeEndianness = (string) => { const result = []; let len = string.length - 2; while (len >= 0) { result.push(string.substr(len, 2)); len -= 2; } return result.join(''); } You can then use this function with any string to convert its endianness Example of using function: var yourstringvar = 'Your string goes here to swap endianness'; var newendian = changeEndianness(yourstringvar); console.log('Your newly swapped endian string', newendian);
  2. So not a lot of information out there, but if you want to convert a Bitcoin or Denarius or any standard crypto typically, you take the block hex to a block hash (typically used for block explorers and things) you just do the following: changeEndianness(SHA256(SHA256(BLOCKHEX))) So basically visually in text it would be: BLOCKHEX => Hashed to SHA256 => Hashed to SHA256 => Swap Endianness = Block Hash You are just hashing the hex twice and then swapping the endianness to obtain the hash of the block.
×
×
  • Create New...