From 5144f88ed95f808e32afea4445ca3c94b8826060 Mon Sep 17 00:00:00 2001 From: Robinson Date: Thu, 13 Jul 2023 01:40:04 +0200 Subject: [PATCH] cleaned comments --- src/dorkbox/bytes/Base58.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dorkbox/bytes/Base58.kt b/src/dorkbox/bytes/Base58.kt index 9d5b72e..c3779de 100644 --- a/src/dorkbox/bytes/Base58.kt +++ b/src/dorkbox/bytes/Base58.kt @@ -58,7 +58,7 @@ import dorkbox.bytes.Base58.divmod *
  • Doubleclicking selects the whole number as one word if it's all alphanumeric.
  • * *

    - * However, note that the encoding/decoding runs in O(n²) time, so it is not useful for large data. + * However, note that the encoding/decoding runs in O(n^2;) time, so it is not useful for large data. *

    * The basic idea of the encoding is to treat the data bytes as a large number represented using * base-256 digits, convert the number to be represented using base-58 digits, preserve the exact @@ -206,7 +206,6 @@ fun ByteArray.encodeToBase58WithChecksum() = ByteArray(size + Base58.CHECKSUM_SI System.arraycopy(this@encodeToBase58WithChecksum, 0, this, 0, this@encodeToBase58WithChecksum.size) val checksum = this@encodeToBase58WithChecksum.sha256().sha256() System.arraycopy(checksum, 0, this, this@encodeToBase58WithChecksum.size, Base58.CHECKSUM_SIZE) - }.encodeToBase58String() fun String.decodeBase58WithChecksum(): ByteArray {