54 * OF THE POSSIBILITY OF SUCH DAMAGE. |
54 * OF THE POSSIBILITY OF SUCH DAMAGE. |
55 * ==================================================================== |
55 * ==================================================================== |
56 */ |
56 */ |
57 |
57 |
58 /* |
58 /* |
59 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
59 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
60 */ |
60 */ |
61 |
61 |
62 /* |
62 /* |
63 * This engine supports SPARC microprocessors that provide AES and other |
63 * This engine supports SPARC microprocessors that provide AES and other |
64 * cipher and hash instructions, such as the T4 microprocessor. |
64 * cipher and hash instructions, such as the T4 microprocessor. |
138 #define HASH_CBLOCK MD5_CBLOCK |
138 #define HASH_CBLOCK MD5_CBLOCK |
139 #define HASH_UPDATE t4_md5_update |
139 #define HASH_UPDATE t4_md5_update |
140 #define HASH_TRANSFORM t4_md5_transform |
140 #define HASH_TRANSFORM t4_md5_transform |
141 #define HASH_FINAL t4_md5_final |
141 #define HASH_FINAL t4_md5_final |
142 #define HASH_BLOCK_DATA_ORDER t4_md5_multiblock |
142 #define HASH_BLOCK_DATA_ORDER t4_md5_multiblock |
143 /* HOST_l2c_t4: Hash is already byte-swapped as Little Endian for SPARC T4: */ |
143 /* Hash is already byte-swapped as Little Endian for SPARC T4: */ |
144 #define HOST_l2c_t4(l, c) (*((unsigned int *)(c)) = (l), (c) += 4, l) |
144 #define HASH_MAKE_STRING(c, s) memcpy((s), (c), MD5_DIGEST_LENGTH); |
145 #define HASH_MAKE_STRING(c, s) do { \ |
|
146 unsigned int ll; \ |
|
147 ll = (c)->A; HOST_l2c_t4(ll, (s)); \ |
|
148 ll = (c)->B; HOST_l2c_t4(ll, (s)); \ |
|
149 ll = (c)->C; HOST_l2c_t4(ll, (s)); \ |
|
150 ll = (c)->D; HOST_l2c_t4(ll, (s)); \ |
|
151 } while (0) |
|
152 |
145 |
153 /* This defines HASH_UPDATE, HASH_TRANSFORM, HASH_FINAL functions: */ |
146 /* This defines HASH_UPDATE, HASH_TRANSFORM, HASH_FINAL functions: */ |
154 #include "md32_common.h" |
147 #include "md32_common.h" |
155 |
148 |
156 |
149 |