aboutsummaryrefslogtreecommitdiff
path: root/src/base58.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge #19739: refactor: remove c-string interfaces for DecodeBase58{Check}Wladimir J. van der Laan2020-08-281-13/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d3e8adfada889a3c9fba930086eda609509aca07 util: remove c-string interfaces for DecodeBase58{Check} (Sebastian Falbesoner) Pull request description: This micro-PR gets rid of base58 function interfaces that are redundant in terms of c-string / std::string variants; the c-string interface for `DecodeBase58Check` is completely unused outside the base58 module, while the c-string interface for `DecodeBase58` is only used in unit tests, where an implicit conversion to std::string is not problematic. ACKs for top commit: practicalswift: ACK d3e8adfada889a3c9fba930086eda609509aca07 -- patch looks correct laanwj: Code review ACK d3e8adfada889a3c9fba930086eda609509aca07 Tree-SHA512: 006a4a1e23b11385f60820c188b8e6b1634a182ca36e29a6580f72150214c65a3fdb273ec439165f26ba88a42d2bf5bab1cf3666a9eaee222fb4e1c00aeba433
| * util: remove c-string interfaces for DecodeBase58{Check}Sebastian Falbesoner2020-08-171-13/+0
| |
* | util: make EncodeBase58Check consume SpansSebastian Falbesoner2020-08-121-2/+2
| |
* | util: make EncodeBase58 consume SpansSebastian Falbesoner2020-08-121-8/+3
|/
* scripted-diff: Bump copyright of files changed in 2019MarcoFalke2019-12-301-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* Add bounds checks in key_io before DecodeBase58CheckPieter Wuille2019-12-051-5/+4
|
* Pass a maximum output length to DecodeBase58 and DecodeBase58CheckPieter Wuille2019-11-191-4/+5
| | | | | | Also remove a needless loop in DecodeBase58 to prune zeroes in the base256 output of the conversion. The number of zeroes is implied by keeping track explicitly of the length during the loop.
* Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort ↵practicalswift2018-11-051-4/+6
| | | | includes.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Split key_io (address/key encodings) off from base58Pieter Wuille2018-02-191-21/+2
|
* Stop using CBase58Data for ext keysPieter Wuille2018-02-191-61/+4
|
* Replace CBitcoinSecret with {Encode,Decode}SecretPieter Wuille2018-02-191-15/+2
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Implement {Encode,Decode}Destination without CBitcoinAddressPieter Wuille2017-09-231-1/+0
|
* Move CBitcoinAddress to base58.cppPieter Wuille2017-09-061-24/+0
|
* Introduce wrappers around CBitcoinAddressPieter Wuille2017-09-061-0/+5
| | | | | | | This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
* scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-2/+2
| | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
* Fix subscript[0] in base58.cppJeremy Rubin2017-07-081-1/+1
|
* [trivial] Fix typos in commentspracticalswift2017-01-271-1/+1
|
* add bip32 pubkey serializationJonas Schnelli2016-04-141-2/+2
| | | | CExtPubKey should be serializable like CPubKey
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* don't try to decode invalid encoded ext keysJonas Schnelli2015-07-251-1/+4
|
* fix and extend CBitcoinExtKeyBase templateJonas Schnelli2015-07-231-1/+5
| | | | | - fix Decode call (req. only one param) - add constructor for base58c->CExtKey
* Non-grammatical language improvementsLuke Dashjr2015-05-021-3/+3
|
* allocators: split allocators and pagelockerCory Fields2015-03-201-0/+1
| | | | | Pagelocker is only needed for secure (usually wallet) operations, so don't make the zero-after-free allocator depend on it.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Convert remaining comments in /src to doxygen formatMichael Ford2014-11-211-12/+12
| | | | | | | | | | - Update comments in checkpoints to be doxygen compatible - Update comments in checkqueue to be doxygen compatible - Update coins to be doxygen compatible - Fix comment typo in crypter.h - Update licenses/copyright dates Closes #5325 #5184 #5183 #5182
* boost: moveonly: split CPubKey and friends to new filesCory Fields2014-10-311-0/+1
|
* Move CTxDestination from script/script to script/standardPieter Wuille2014-09-161-0/+1
|
* Merge pull request #4623Wladimir J. van der Laan2014-09-101-0/+1
|\ | | | | | | e84843c Broken addresses on command line no longer trigger testnet. (Ross Nicoll)
| * Broken addresses on command line no longer trigger testnet.Ross Nicoll2014-08-301-0/+1
| | | | | | | | | | When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the user to the test network.
* | Move CScript class and dependencies to script/scriptjtimon2014-09-081-1/+1
| |
* | Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes)jtimon2014-09-081-1/+1
|/
* Move base58.h implementation code to base58.cppPieter Wuille2014-05-101-225/+34
|
* Replace DecodeBase58/EncodeBase58 with direct implementation.Pieter Wuille2014-04-221-93/+9
| | | | | | This removes the bignum/OpenSSL dependency. The base58 transformation code is also moved to a separate .cpp file.
* Improve and expand base58 commentsrxl2014-04-121-26/+38
| | | | update comments so doxygen will pick them up
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-6/+9
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Bump Year Number to 2013super32013-10-201-1/+1
|
* BIP32 derivation implementationPieter Wuille2013-07-151-0/+26
|
* Generalize version bytesPieter Wuille2013-06-241-23/+23
|
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-191-84/+23
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-301-12/+10
|
* make CBase58Data class use zero_after_free_allocatorPhilip Kaufmann2012-11-091-10/+4
| | | | | - this way there is no need for an explicit destructor, who does the same thing anyway
* don't use memset() in privacy/security relevant code partsPhilip Kaufmann2012-11-091-2/+4
| | | | | | | | | | | | As memset() can be optimized out by a compiler it should not be used in privacy/security relevant code parts. OpenSSL provides the safe OPENSSL_cleanse() function in crypto.h, which perfectly does the job of clean and overwrite data. For details see: http://www.viva64.com/en/b/0178/ - change memset() to OPENSSL_cleanse() where appropriate - change a hard-coded number from netbase.cpp into a sizeof()
* Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik2012-09-181-1/+1
|
* Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-011-1/+1
|
* Fix a couple more typosfanquake2012-06-301-1/+1
|
* Fix a few typosfanquake2012-06-291-3/+3
|
* Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille2012-05-241-30/+71
| | | | | | | | | | | | | | | | | This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.