OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_CRYPTO_CHANNEL_ID_H_ | 5 #ifndef NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
6 #define NET_QUIC_CRYPTO_CHANNEL_ID_H_ | 6 #define NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 base::StringPiece signature); | 50 base::StringPiece signature); |
51 | 51 |
52 // FOR TESTING ONLY: VerifyRaw returns true iff |signature| is a valid | 52 // FOR TESTING ONLY: VerifyRaw returns true iff |signature| is a valid |
53 // signature of |signed_data| by |key|. |is_channel_id_signature| indicates | 53 // signature of |signed_data| by |key|. |is_channel_id_signature| indicates |
54 // whether |signature| is a ChannelID signature (with kContextStr prepended | 54 // whether |signature| is a ChannelID signature (with kContextStr prepended |
55 // to the data to be signed). | 55 // to the data to be signed). |
56 static bool VerifyRaw(base::StringPiece key, | 56 static bool VerifyRaw(base::StringPiece key, |
57 base::StringPiece signed_data, | 57 base::StringPiece signed_data, |
58 base::StringPiece signature, | 58 base::StringPiece signature, |
59 bool is_channel_id_signature); | 59 bool is_channel_id_signature); |
| 60 |
| 61 private: |
| 62 DISALLOW_COPY_AND_ASSIGN(ChannelIDVerifier); |
60 }; | 63 }; |
61 | 64 |
62 } // namespace net | 65 } // namespace net |
63 | 66 |
64 #endif // NET_QUIC_CRYPTO_CHANNEL_ID_H_ | 67 #endif // NET_QUIC_CRYPTO_CHANNEL_ID_H_ |
OLD | NEW |