updated dependencies and go
This commit is contained in:
+4
-7
@@ -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] {
|
||||
|
||||
Reference in New Issue
Block a user