Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
Sign generates a state string signed with SHA3 256. It is useful for OAuth2 or Webhook callback. base64RawURL(8 bytes time + 8 bytes nonce + 32 bytes sha3 256)
fmt.Println(Sign([]byte("my key"), "")) // zILSqgsAAACNRsElhX2IP-HqOmhKKSMJDNv2f7G2ONo-ULM4G4zppTWTiSDKwCjc fmt.Println(Sign([]byte("my key"), "some message")) // zILSqgsAAAA01z-LM1BfpaW9l7dK9zPUUJZl1P0_Jr4yEgYWHSQ_bFeiGFKA6qq6
Types ¶
Click to show internal directories.
Click to hide internal directories.