mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
add support for iris-specific form of generating connection IDs as requested at: https://github.com/kataras/neffos/issues/1#issuecomment-508689819
Former-commit-id: 0994b63373ebe2b5383a28f042aa2133061cbd18
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
// MustGenerateKey generates a public and private key pair.
|
||||
// MustGenerateKey generates a private and public key pair.
|
||||
// It panics if any error occurred.
|
||||
func MustGenerateKey() *ecdsa.PrivateKey {
|
||||
privateKey, err := GenerateKey()
|
||||
@@ -31,7 +31,7 @@ func MustGenerateKey() *ecdsa.PrivateKey {
|
||||
return privateKey
|
||||
}
|
||||
|
||||
// GenerateKey generates a public and private key pair.
|
||||
// GenerateKey generates a private and public key pair.
|
||||
func GenerateKey() (*ecdsa.PrivateKey, error) {
|
||||
return ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user