blob: 8fe94ad5fdac2079ee4972217c7317a0454af019 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_CURVECP_CONNECTION_KEY_H_
#define NET_CURVECP_CONNECTION_KEY_H_
#pragma once
#include <string>
namespace net {
// A ConnectionKey uniquely identifies a connection.
// It represents the client's short-term public key and is 32 bytes.
class ConnectionKey {
public:
ConnectionKey();
ConnectionKey(unsigned char bytes[]);
ConnectionKey(const ConnectionKey& key);
ConnectionKey& operator=(const ConnectionKey& other);
bool operator==(const ConnectionKey& other) const;
bool operator<(const ConnectionKey& other) const;
std::string ToString() const;
private:
unsigned char key_[32];
};
} // namespace net
#endif // NET_CURVECP_CONNECTION_KEY_H_
|