Git Product home page Git Product logo

go-itsdangerous's People

Contributors

czekan avatar iromli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-itsdangerous's Issues

Compatibility issue with go 1.16

Signing message on go version 1.16 makes crypto/hmac lib panic

package main

import (
        "log"

        itsdangerous "github.com/iromli/go-itsdangerous"
)

func main() {
        secret := "seeecret"
        msg := "6858"
        signature := itsdangerous.NewSignature(secret, "", "", "", nil, nil)
        signed_msg, _ := signature.Sign(msg)
        log.Println(signed_msg)
}
panic: crypto/hmac: hash generation function does not produce unique values

goroutine 1 [running]:
crypto/hmac.New(0xc000068e28, 0xc000014048, 0x14, 0x18, 0x14, 0x18)
	/usr/local/go-faketime/src/crypto/hmac/hmac.go:143 +0x370
github.com/iromli/go-itsdangerous.(*HMACAlgorithm).GetSignature(0xc000010280, 0xc000014030, 0x14, 0x4ce4e6, 0x4, 0x7f346845a108, 0x60, 0xc000056180)
	/tmp/gopath230749032/pkg/mod/github.com/iromli/[email protected]/algorithm.go:23 +0xa5
github.com/iromli/go-itsdangerous.(*Signature).Get(0xc000056180, 0x4ce4e6, 0x4, 0x100000000000001, 0xc000056180, 0xc000068ef0, 0x4a7b0d)
	/tmp/gopath230749032/pkg/mod/github.com/iromli/[email protected]/signature.go:68 +0x99
github.com/iromli/go-itsdangerous.(*Signature).Sign(0xc000056180, 0x4ce4e6, 0x4, 0x13, 0x4ce3a7, 0x1, 0x4cf946)
	/tmp/gopath230749032/pkg/mod/github.com/iromli/[email protected]/signature.go:88 +0x45
main.main()
	/tmp/sandbox285037293/prog.go:13 +0x79

Program exited: status 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.