tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

auth_test_cases.c (2856B)


      1 /*
      2 *
      3 * Copyright (c) 2013-2021, Cisco Systems, Inc.
      4 * All rights reserved.
      5 *
      6 * Redistribution and use in source and binary forms, with or without
      7 * modification, are permitted provided that the following conditions
      8 * are met:
      9 *
     10 *   Redistributions of source code must retain the above copyright
     11 *   notice, this list of conditions and the following disclaimer.
     12 *
     13 *   Redistributions in binary form must reproduce the above
     14 *   copyright notice, this list of conditions and the following
     15 *   disclaimer in the documentation and/or other materials provided
     16 *   with the distribution.
     17 *
     18 *   Neither the name of the Cisco Systems, Inc. nor the names of its
     19 *   contributors may be used to endorse or promote products derived
     20 *   from this software without specific prior written permission.
     21 *
     22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     26 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
     27 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
     33 * OF THE POSSIBILITY OF SUCH DAMAGE.
     34 *
     35 */
     36 
     37 #include "auth_test_cases.h"
     38 #include <stddef.h>
     39 
     40 /* clang-format off */
     41 static const uint8_t srtp_hmac_test_case_0_key[20] = {
     42    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
     43    0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
     44    0x0b, 0x0b, 0x0b, 0x0b
     45 };
     46 /* clang-format on */
     47 
     48 /* clang-format off */
     49 static const uint8_t srtp_hmac_test_case_0_data[8] = {
     50    0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 /* "Hi There" */
     51 };
     52 /* clang-format on */
     53 
     54 /* clang-format off */
     55 static const uint8_t srtp_hmac_test_case_0_tag[20] = {
     56    0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
     57    0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e,
     58    0xf1, 0x46, 0xbe, 0x00
     59 };
     60 /* clang-format on */
     61 
     62 const srtp_auth_test_case_t srtp_hmac_test_case_0 = {
     63    sizeof(srtp_hmac_test_case_0_key),  /* octets in key            */
     64    srtp_hmac_test_case_0_key,          /* key                      */
     65    sizeof(srtp_hmac_test_case_0_data), /* octets in data           */
     66    srtp_hmac_test_case_0_data,         /* data                     */
     67    sizeof(srtp_hmac_test_case_0_tag),  /* octets in tag            */
     68    srtp_hmac_test_case_0_tag,          /* tag                      */
     69    NULL                                /* pointer to next testcase */
     70 };