Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Crypto_light by
Diff: hash/MD2.cpp
- Revision:
- 10:bc9c23aa3870
- Parent:
- 7:2dbbdfb08123
- Child:
- 13:ac8e23b98dae
--- a/hash/MD2.cpp Mon Sep 16 08:35:36 2013 +0000
+++ b/hash/MD2.cpp Tue Sep 24 07:19:04 2013 +0000
@@ -123,7 +123,7 @@
memcpy(hash, x, 16);
}
-void MD2::computeBlock(uint8_t *checksum2, uint8_t *x2, uint8_t *l2, uint8_t *buffer2)
+__forceinline void MD2::computeBlock(uint8_t *checksum2, uint8_t *x2, uint8_t *l2, uint8_t *buffer2)
{
if(checksum2 != buffer2)
{
@@ -146,7 +146,7 @@
x3[8+j] = x3[4+j] ^ x3[j];
uint8_t t = 0;
-
+ #pragma unroll_completely
for(int j = 0; j < 18; ++j)
{
t = (x2[0] ^= s[t]);
@@ -197,7 +197,7 @@
t = (x2[45] ^= s[t]);
t = (x2[46] ^= s[t]);
t = (x2[47] ^= s[t]);
-
+
t += j;
}
}
\ No newline at end of file
