summaryrefslogtreecommitdiff
path: root/ntor
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2014-05-16 00:11:53 +0000
committerYawning Angel <yawning@schwanenlied.me>2014-05-16 00:11:53 +0000
commitf4877920f854b0b361e446d7a6ce91527c4f07ee (patch)
tree64723f4e37a91f68ccf8d27a45f711d7ff151f63 /ntor
parent77090696177d7b0a9dfd5a11c0ac7dbaa3623d6b (diff)
Change the handshake wire format.
* HMAC-SHA256 -> HMAC-SHA256-128. * Mark/MAC are now both caluclated using Public Key | NodeID. This breaks wire protocol compatibility.
Diffstat (limited to 'ntor')
-rw-r--r--ntor/ntor.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ntor/ntor.go b/ntor/ntor.go
index 0744d20..eecf038 100644
--- a/ntor/ntor.go
+++ b/ntor/ntor.go
@@ -147,6 +147,10 @@ func NodeIDFromBase64(encoded string) (*NodeID, error) {
return NewNodeID(raw)
}
+// Bytes returns a pointer to the raw NodeID.
+func (id *NodeID) Bytes() *[NodeIDLength]byte {
+ return (*[NodeIDLength]byte)(id)
+}
// Base64 returns the Base64 representation of the NodeID.
func (id *NodeID) Base64() string {