From 8fe2974aaae2ed32cd0bdca8b0c881917811b2a2 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 28 Sep 2021 14:01:42 -0700 Subject: [PATCH] Go conventions --- tor/torUtils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tor/torUtils.go b/tor/torUtils.go index 8b194a8..4118d38 100644 --- a/tor/torUtils.go +++ b/tor/torUtils.go @@ -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