]>
Commit | Line | Data |
---|---|---|
3d178db7 TM |
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 <openssl/sha.h> | |
15 | #include "crypto/ppc_arch.h" | |
16 | ||
17 | void sha256_block_p8(void *ctx, const void *inp, size_t len); | |
18 | void sha256_block_ppc(void *ctx, const void *inp, size_t len); | |
19 | void sha256_block_data_order(void *ctx, const void *inp, size_t len); | |
20 | void sha256_block_data_order(void *ctx, const void *inp, size_t len) | |
21 | { | |
22 | OPENSSL_ppccap_P & PPC_CRYPTO207 ? sha256_block_p8(ctx, inp, len) : | |
23 | sha256_block_ppc(ctx, inp, len); | |
24 | } | |
25 | ||
26 | void sha512_block_p8(void *ctx, const void *inp, size_t len); | |
27 | void sha512_block_ppc(void *ctx, const void *inp, size_t len); | |
28 | void sha512_block_data_order(void *ctx, const void *inp, size_t len); | |
29 | void sha512_block_data_order(void *ctx, const void *inp, size_t len) | |
30 | { | |
31 | OPENSSL_ppccap_P & PPC_CRYPTO207 ? sha512_block_p8(ctx, inp, len) : | |
32 | sha512_block_ppc(ctx, inp, len); | |
33 | } |