Coverage Report

Created: 2025-06-13 06:09

/src/uWebSockets/src/WebSocketHandshake.h
Line
Count
Source
1
/*
2
 * Authored by Alex Hultman, 2018-2020.
3
 * Intellectual property of third-party.
4
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
9
 *     http://www.apache.org/licenses/LICENSE-2.0
10
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
*/
17
18
#ifndef UWS_WEBSOCKETHANDSHAKE_H
19
#define UWS_WEBSOCKETHANDSHAKE_H
20
21
#include <cstdint>
22
#include <cstddef>
23
24
namespace uWS {
25
26
struct WebSocketHandshake {
27
    template <int N, typename T>
28
    struct static_for {
29
36.6M
        void operator()(uint32_t *a, uint32_t *b) {
30
36.6M
            static_for<N - 1, T>()(a, b);
31
36.6M
            T::template f<N - 1>(a, b);
32
36.6M
        }
uWS::WebSocketHandshake::static_for<16, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<15, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<14, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<13, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<12, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<11, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<10, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<9, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<8, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<7, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<6, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<5, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop2>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop2>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop2>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop2>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<20, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<19, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<18, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<17, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<16, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<15, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<14, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<13, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<12, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<11, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<10, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<9, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<8, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<7, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<6, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<5, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<20, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<19, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<18, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<17, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<16, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<15, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<14, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<13, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<12, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<11, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<10, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<9, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<8, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<7, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<6, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<5, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<20, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<19, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<18, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<17, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<16, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<15, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<14, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<13, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<12, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<11, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<10, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<9, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<8, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<7, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<6, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<5, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<5, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<4, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<3, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<2, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
uWS::WebSocketHandshake::static_for<1, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
29
431k
        void operator()(uint32_t *a, uint32_t *b) {
30
431k
            static_for<N - 1, T>()(a, b);
31
431k
            T::template f<N - 1>(a, b);
32
431k
        }
33
    };
34
35
    template <typename T>
36
    struct static_for<0, T> {
37
2.58M
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop1>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop2>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop3>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop4>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop5>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
uWS::WebSocketHandshake::static_for<0, uWS::WebSocketHandshake::Sha1Loop6>::operator()(unsigned int*, unsigned int*)
Line
Count
Source
37
431k
        void operator()(uint32_t */*a*/, uint32_t */*hash*/) {}
38
    };
39
40
96.6M
    static inline uint32_t rol(uint32_t value, size_t bits) {return (value << bits) | (value >> (32 - bits));}
41
27.6M
    static inline uint32_t blk(uint32_t b[16], size_t i) {
42
27.6M
        return rol(b[(i + 13) & 15] ^ b[(i + 8) & 15] ^ b[(i + 2) & 15] ^ b[i], 1);
43
27.6M
    }
44
45
    struct Sha1Loop1 {
46
        template <int i>
47
6.90M
        static inline void f(uint32_t *a, uint32_t *b) {
48
6.90M
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
6.90M
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
6.90M
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<4>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<5>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<6>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<7>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<8>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<9>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<10>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<11>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<12>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<13>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<14>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
void uWS::WebSocketHandshake::Sha1Loop1::f<15>(unsigned int*, unsigned int*)
Line
Count
Source
47
431k
        static inline void f(uint32_t *a, uint32_t *b) {
48
431k
            a[i % 5] += ((a[(3 + i) % 5] & (a[(2 + i) % 5] ^ a[(1 + i) % 5])) ^ a[(1 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(4 + i) % 5], 5);
49
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
50
431k
        }
51
    };
52
    struct Sha1Loop2 {
53
        template <int i>
54
1.72M
        static inline void f(uint32_t *a, uint32_t *b) {
55
1.72M
            b[i] = blk(b, i);
56
1.72M
            a[(1 + i) % 5] += ((a[(4 + i) % 5] & (a[(3 + i) % 5] ^ a[(2 + i) % 5])) ^ a[(2 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(5 + i) % 5], 5);
57
1.72M
            a[(4 + i) % 5] = rol(a[(4 + i) % 5], 30);
58
1.72M
        }
void uWS::WebSocketHandshake::Sha1Loop2::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
54
431k
        static inline void f(uint32_t *a, uint32_t *b) {
55
431k
            b[i] = blk(b, i);
56
431k
            a[(1 + i) % 5] += ((a[(4 + i) % 5] & (a[(3 + i) % 5] ^ a[(2 + i) % 5])) ^ a[(2 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(5 + i) % 5], 5);
57
431k
            a[(4 + i) % 5] = rol(a[(4 + i) % 5], 30);
58
431k
        }
void uWS::WebSocketHandshake::Sha1Loop2::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
54
431k
        static inline void f(uint32_t *a, uint32_t *b) {
55
431k
            b[i] = blk(b, i);
56
431k
            a[(1 + i) % 5] += ((a[(4 + i) % 5] & (a[(3 + i) % 5] ^ a[(2 + i) % 5])) ^ a[(2 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(5 + i) % 5], 5);
57
431k
            a[(4 + i) % 5] = rol(a[(4 + i) % 5], 30);
58
431k
        }
void uWS::WebSocketHandshake::Sha1Loop2::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
54
431k
        static inline void f(uint32_t *a, uint32_t *b) {
55
431k
            b[i] = blk(b, i);
56
431k
            a[(1 + i) % 5] += ((a[(4 + i) % 5] & (a[(3 + i) % 5] ^ a[(2 + i) % 5])) ^ a[(2 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(5 + i) % 5], 5);
57
431k
            a[(4 + i) % 5] = rol(a[(4 + i) % 5], 30);
58
431k
        }
void uWS::WebSocketHandshake::Sha1Loop2::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
54
431k
        static inline void f(uint32_t *a, uint32_t *b) {
55
431k
            b[i] = blk(b, i);
56
431k
            a[(1 + i) % 5] += ((a[(4 + i) % 5] & (a[(3 + i) % 5] ^ a[(2 + i) % 5])) ^ a[(2 + i) % 5]) + b[i] + 0x5a827999 + rol(a[(5 + i) % 5], 5);
57
431k
            a[(4 + i) % 5] = rol(a[(4 + i) % 5], 30);
58
431k
        }
59
    };
60
    struct Sha1Loop3 {
61
        template <int i>
62
8.62M
        static inline void f(uint32_t *a, uint32_t *b) {
63
8.62M
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
8.62M
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
8.62M
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
8.62M
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<4>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<5>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<6>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<7>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<8>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<9>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<10>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<11>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<12>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<13>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<14>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<15>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<16>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<17>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<18>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
void uWS::WebSocketHandshake::Sha1Loop3::f<19>(unsigned int*, unsigned int*)
Line
Count
Source
62
431k
        static inline void f(uint32_t *a, uint32_t *b) {
63
431k
            b[(i + 4) % 16] = blk(b, (i + 4) % 16);
64
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 4) % 16] + 0x6ed9eba1 + rol(a[(4 + i) % 5], 5);
65
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
66
431k
        }
67
    };
68
    struct Sha1Loop4 {
69
        template <int i>
70
8.62M
        static inline void f(uint32_t *a, uint32_t *b) {
71
8.62M
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
8.62M
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
8.62M
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
8.62M
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<4>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<5>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<6>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<7>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<8>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<9>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<10>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<11>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<12>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<13>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<14>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<15>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<16>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<17>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<18>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
void uWS::WebSocketHandshake::Sha1Loop4::f<19>(unsigned int*, unsigned int*)
Line
Count
Source
70
431k
        static inline void f(uint32_t *a, uint32_t *b) {
71
431k
            b[(i + 8) % 16] = blk(b, (i + 8) % 16);
72
431k
            a[i % 5] += (((a[(3 + i) % 5] | a[(2 + i) % 5]) & a[(1 + i) % 5]) | (a[(3 + i) % 5] & a[(2 + i) % 5])) + b[(i + 8) % 16] + 0x8f1bbcdc + rol(a[(4 + i) % 5], 5);
73
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
74
431k
        }
75
    };
76
    struct Sha1Loop5 {
77
        template <int i>
78
8.62M
        static inline void f(uint32_t *a, uint32_t *b) {
79
8.62M
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
8.62M
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
8.62M
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
8.62M
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<4>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<5>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<6>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<7>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<8>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<9>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<10>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<11>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<12>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<13>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<14>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<15>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<16>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<17>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<18>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
void uWS::WebSocketHandshake::Sha1Loop5::f<19>(unsigned int*, unsigned int*)
Line
Count
Source
78
431k
        static inline void f(uint32_t *a, uint32_t *b) {
79
431k
            b[(i + 12) % 16] = blk(b, (i + 12) % 16);
80
431k
            a[i % 5] += (a[(3 + i) % 5] ^ a[(2 + i) % 5] ^ a[(1 + i) % 5]) + b[(i + 12) % 16] + 0xca62c1d6 + rol(a[(4 + i) % 5], 5);
81
431k
            a[(3 + i) % 5] = rol(a[(3 + i) % 5], 30);
82
431k
        }
83
    };
84
    struct Sha1Loop6 {
85
        template <int i>
86
2.15M
        static inline void f(uint32_t *a, uint32_t *b) {
87
2.15M
            b[i] += a[4 - i];
88
2.15M
        }
void uWS::WebSocketHandshake::Sha1Loop6::f<0>(unsigned int*, unsigned int*)
Line
Count
Source
86
431k
        static inline void f(uint32_t *a, uint32_t *b) {
87
431k
            b[i] += a[4 - i];
88
431k
        }
void uWS::WebSocketHandshake::Sha1Loop6::f<1>(unsigned int*, unsigned int*)
Line
Count
Source
86
431k
        static inline void f(uint32_t *a, uint32_t *b) {
87
431k
            b[i] += a[4 - i];
88
431k
        }
void uWS::WebSocketHandshake::Sha1Loop6::f<2>(unsigned int*, unsigned int*)
Line
Count
Source
86
431k
        static inline void f(uint32_t *a, uint32_t *b) {
87
431k
            b[i] += a[4 - i];
88
431k
        }
void uWS::WebSocketHandshake::Sha1Loop6::f<3>(unsigned int*, unsigned int*)
Line
Count
Source
86
431k
        static inline void f(uint32_t *a, uint32_t *b) {
87
431k
            b[i] += a[4 - i];
88
431k
        }
void uWS::WebSocketHandshake::Sha1Loop6::f<4>(unsigned int*, unsigned int*)
Line
Count
Source
86
431k
        static inline void f(uint32_t *a, uint32_t *b) {
87
431k
            b[i] += a[4 - i];
88
431k
        }
89
    };
90
91
431k
    static inline void sha1(uint32_t hash[5], uint32_t b[16]) {
92
431k
        uint32_t a[5] = {hash[4], hash[3], hash[2], hash[1], hash[0]};
93
431k
        static_for<16, Sha1Loop1>()(a, b);
94
431k
        static_for<4, Sha1Loop2>()(a, b);
95
431k
        static_for<20, Sha1Loop3>()(a, b);
96
431k
        static_for<20, Sha1Loop4>()(a, b);
97
431k
        static_for<20, Sha1Loop5>()(a, b);
98
431k
        static_for<5, Sha1Loop6>()(a, hash);
99
431k
    }
100
101
215k
    static inline void base64(unsigned char *src, char *dst) {
102
215k
        const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
103
1.50M
        for (int i = 0; i < 18; i += 3) {
104
1.29M
            *dst++ = b64[(src[i] >> 2) & 63];
105
1.29M
            *dst++ = b64[((src[i] & 3) << 4) | ((src[i + 1] & 240) >> 4)];
106
1.29M
            *dst++ = b64[((src[i + 1] & 15) << 2) | ((src[i + 2] & 192) >> 6)];
107
1.29M
            *dst++ = b64[src[i + 2] & 63];
108
1.29M
        }
109
215k
        *dst++ = b64[(src[18] >> 2) & 63];
110
215k
        *dst++ = b64[((src[18] & 3) << 4) | ((src[19] & 240) >> 4)];
111
215k
        *dst++ = b64[((src[19] & 15) << 2)];
112
215k
        *dst++ = '=';
113
215k
    }
114
115
public:
116
215k
    static inline void generate(const char input[24], char output[28]) {
117
215k
        uint32_t b_output[5] = {
118
215k
            0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0
119
215k
        };
120
215k
        uint32_t b_input[16] = {
121
215k
            0, 0, 0, 0, 0, 0, 0x32353845, 0x41464135, 0x2d453931, 0x342d3437, 0x44412d39,
122
215k
            0x3543412d, 0x43354142, 0x30444338, 0x35423131, 0x80000000
123
215k
        };
124
125
1.50M
        for (int i = 0; i < 6; i++) {
126
1.29M
            b_input[i] = (uint32_t) ((input[4 * i + 3] & 0xff) | (input[4 * i + 2] & 0xff) << 8 | (input[4 * i + 1] & 0xff) << 16 | (input[4 * i + 0] & 0xff) << 24);
127
1.29M
        }
128
215k
        sha1(b_output, b_input);
129
215k
        uint32_t last_b[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480};
130
215k
        sha1(b_output, last_b);
131
1.29M
        for (int i = 0; i < 5; i++) {
132
1.07M
            uint32_t tmp = b_output[i];
133
1.07M
            char *bytes = (char *) &b_output[i];
134
1.07M
            bytes[3] = (char) (tmp & 0xff);
135
1.07M
            bytes[2] = (char) ((tmp >> 8) & 0xff);
136
1.07M
            bytes[1] = (char) ((tmp >> 16) & 0xff);
137
1.07M
            bytes[0] = (char) ((tmp >> 24) & 0xff);
138
1.07M
        }
139
215k
        base64((unsigned char *) b_output, output);
140
215k
    }
141
};
142
143
}
144
145
#endif // UWS_WEBSOCKETHANDSHAKE_H