Skip to content
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

encoding/base64: with normal padding: input=>encode=>decode=>output (!=input) #25552

Closed
jeffkayser2 opened this issue May 24, 2018 · 3 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@jeffkayser2
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

[jkayser@oel7latest ~]$ go version
go version go1.10.2 linux/amd64
[jkayser@oel7latest ~]$

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

[jkayser@oel7latest ~]$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jkayser/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jkayser"
GORACE=""
GOROOT="/usr/local/go1.10.2"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go1.10.2/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build522215723=/tmp/go-build -gno-record-gcc-switches"
[jkayser@oel7latest ~]$

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/-CtQL8ilWPK

What did you expect to see?

The input and output being identical.

What did you see instead?

input: 6162
output: 5957493d
decoded: 616200
input != decoded

@fraenkel
Copy link
Contributor

If you actually checked the number of bytes written during decode and resize it, you will end up with the same value as input.

@ghost
Copy link

ghost commented May 25, 2018

@andybons andybons changed the title base64 with normal padding: input=>encode=>decode=>output (!=input) encoding/base64: with normal padding: input=>encode=>decode=>output (!=input) May 25, 2018
@andybons andybons added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 25, 2018
@andybons andybons added this to the Unplanned milestone May 25, 2018
@andybons
Copy link
Member

Closing as @fraenkel and @opennota seem to have provided an answer to your issue. Please let me know if I should re-open.

@golang golang locked and limited conversation to collaborators May 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants