Go conventions
This commit is contained in:
parent
6d5accb338
commit
8fe2974aaa
|
@ -56,8 +56,8 @@ func IsValidHostname(address string) bool {
|
|||
// to do this we need to multiply the point by the order of the group and check that the
|
||||
// result is the ed25519 identity element.
|
||||
// l = order of the group (minus 1)
|
||||
l_bytes := []byte{236, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16}
|
||||
l,_ := edwards25519.NewScalar().SetCanonicalBytes(l_bytes)
|
||||
lBytes := []byte{236, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16}
|
||||
l,_ := edwards25519.NewScalar().SetCanonicalBytes(lBytes)
|
||||
|
||||
// construct a curve point from the public key
|
||||
// if this fails then the hostname is invalid
|
||||
|
|
Loading…
Reference in New Issue