1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/websockets/websocket_handshake_challenge.h"
7 #include "base/base64.h"
9 #include "net/websockets/websocket_handshake_constants.h"
13 std::string
ComputeSecWebSocketAccept(const std::string
& key
) {
15 std::string hash
= base::SHA1HashString(key
+ websockets::kWebSocketGuid
);
16 base::Base64Encode(hash
, &accept
);