esp32s2: update copyright notice in signature test

pull/5959/merge
Jan Brudný 2021-06-21 10:56:19 +02:00
rodzic 562ce4d009
commit 7fa88a49d4
2 zmienionych plików z 18 dodań i 3 usunięć

Wyświetl plik

@ -1,5 +1,10 @@
/* File generated by gen_digital_signature_tests.py */
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*
* File generated by gen_digital_signature_tests.py
*/
#define NUM_HMAC_KEYS 3
static const uint8_t test_hmac_keys[NUM_HMAC_KEYS][32] = {

Wyświetl plik

@ -1,5 +1,8 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import datetime
import hashlib
import hmac
import os
@ -52,7 +55,14 @@ hmac_keys = [os.urandom(32) for x in range(NUM_HMAC_KEYS)]
messages = [random.randrange(0, 1 << 4096) for x in range(NUM_MESSAGES)]
with open('digital_signature_test_cases.h', 'w') as f:
f.write('/* File generated by gen_digital_signature_tests.py */\n\n')
f.write('/*\n')
year = datetime.datetime.now().year
f.write(' * SPDX-FileCopyrightText: {year} Espressif Systems (Shanghai) CO LTD\n'.format(year=year))
f.write(' *\n')
f.write(' * SPDX-License-Identifier: Apache-2.0\n')
f.write(' *\n')
f.write(' * File generated by gen_digital_signature_tests.py\n')
f.write(' */\n')
# Write out HMAC keys
f.write('#define NUM_HMAC_KEYS %d\n\n' % NUM_HMAC_KEYS)