Skip to content

Incorrect Encoding of ffffffffffffffffffffffffffffffff #4

Description

@theory

Compare the output from jxskiss/base62 to that from keys-pub/keys/encoding:

package main

import (
	"fmt"

	"github.com/jxskiss/base62"
	"github.com/keys-pub/keys/encoding"
)

func main() {
	id := []byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}
	fmt.Println(base62.EncodeToString(id[:]))
	fmt.Println(encoding.EncodeBase62(id[:]))
}

Output:

fffffffffffffffffffffffffH
7n42DGM5Tflk9n8mt7Fhc7

I believe keys-pub/keys/encoding is correct and jxskiss/base62 is not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions