What is the issue:
When I go ahead and encode a value to Base58, everything works as intended (e.g., correct hash). However, when decoding, I receive the incorrect value. Here is the example:
let test = Base58.base58Encode([UInt8]([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) // "1Bhh3pU9gLXZhoVxkr5wyg9sX6"
let test2 = Base58.base58Decode(test) // [49, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Expected: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Received: [49, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
What is the issue:
When I go ahead and encode a value to Base58, everything works as intended (e.g., correct hash). However, when decoding, I receive the incorrect value. Here is the example:
Expected: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Received: [49, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]