updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+4 -7
View File
@@ -44,8 +44,8 @@ func newBase58Encoding(alphabet string) *B58Encoding {
b58 := make([]byte, 0, 256)
for i := byte(0); i < 32; i++ {
for j := byte(0); j < 8; j++ {
for i := range byte(32) {
for j := range byte(8) {
b := i*8 + j
@@ -100,7 +100,7 @@ func (enc *B58Encoding) Encode(src []byte) ([]byte, error) {
}
} else {
m := mod.Int64()
for i := 0; i < 10; i++ {
for range 10 {
answer = append(answer, enc.alphabet[m%58])
m /= 58
}
@@ -137,10 +137,7 @@ func (enc *B58Encoding) Decode(src []byte) ([]byte, error) {
scratch := new(big.Int)
for t := src; len(t) > 0; {
n := len(t)
if n > 10 {
n = 10
}
n := min(len(t), 10)
total := uint64(0)
for _, v := range t[:n] {