Skip to content

Add encode & decode operations to base62 helper #10038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
fix comment
  • Loading branch information
sgmiller committed Sep 25, 2020
commit c6dd42b347eb19c70a42d620bf09b8055caaa682
3 changes: 2 additions & 1 deletion sdk/helper/base62/base62.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func Decode(dst []byte, src string) ([]byte, error) {
var num big.Int
var x big.Int

// n = c[0]*62^0 + c[1]*62^1 + c[2]*62^2 ...
// n = c[0]
// n = n * 62 + c[1] ...
for i, c := range src {
if i > 0 {
num.Mul(&num, csLenBig)
Expand Down