VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.2/crypto/chacha/chacha_ppc.c@ 94460

最後變更 在這個檔案從94460是 94320,由 vboxsync 提交於 3 年 前

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

檔案大小: 1.4 KB
 
1/*
2 * Copyright 2009-2021 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include <stdlib.h>
11#include <string.h>
12
13#include <openssl/opensslconf.h>
14#include "crypto/chacha.h"
15#include "crypto/ppc_arch.h"
16
17void ChaCha20_ctr32_int(unsigned char *out, const unsigned char *inp,
18 size_t len, const unsigned int key[8],
19 const unsigned int counter[4]);
20void ChaCha20_ctr32_vmx(unsigned char *out, const unsigned char *inp,
21 size_t len, const unsigned int key[8],
22 const unsigned int counter[4]);
23void ChaCha20_ctr32_vsx(unsigned char *out, const unsigned char *inp,
24 size_t len, const unsigned int key[8],
25 const unsigned int counter[4]);
26void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp,
27 size_t len, const unsigned int key[8],
28 const unsigned int counter[4])
29{
30 OPENSSL_ppccap_P & PPC_CRYPTO207
31 ? ChaCha20_ctr32_vsx(out, inp, len, key, counter)
32 : OPENSSL_ppccap_P & PPC_ALTIVEC
33 ? ChaCha20_ctr32_vmx(out, inp, len, key, counter)
34 : ChaCha20_ctr32_int(out, inp, len, key, counter);
35}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette