Original post

I ran into and issue that gave me sleepless night,

sign_test.:31: got a29kkB5HdwZj+IQgtzIIuMh1Pl+8KooSIrrEC7WcrNwA5+8tufTHGNkzjwmocKfV5pl+BBpdqJnTG0w66ymIB2hlbGxv, want a29kkB5HdwZj+IQgtzIIuMh1Pl+8KooSIrrEC7WcrNwA5+8tufTHGNkzjwmocKfV5pl+BBpdqJnTG0w66ymIBw==

After hours wasted, i realized the problem may be from the base64

const data = "AdRNDeBxM96UcaTQ+FijHLMCkm6pnkVUJPWkAOkTh3p106HzVCgeFkWfLCw1+KRzzQJTd39ZfoFkkSmuefPXAg=="

func main() {

        b, err := base64.StdEncoding.DecodeString(data)
        if err != nil {
                log.Fatal(err)
        }

        out := base64.RawStdEncoding.EncodeToString(b)

        fmt.Println("expected: ", data)
        fmt.Println("output  : ", out)

        if out != data {
                log.Fatal("somthing went wrong")
        }
}

Output

expected:  AdRNDeBxM96UcaTQ+FijHLMCkm6pnkVUJPWkAOkTh3p106HzVCgeFkWfLCw1+KRzzQJTd39ZfoFkkSmuefPXAg==
output  :  AdRNDeBxM96UcaTQ+FijHLMCkm6pnkVUJPWkAOkTh3p106HzVCgeFkWfLCw1+KRzzQJTd39ZfoFkkSmuefPXAg
2009/11/10 23:00:00 somthing went wrong

test: https://play.golang.org/p/BLzzAje2Q_c

Can anyone please clarify why the padding == is missing ?