aboutsummaryrefslogtreecommitdiff
path: root/mp/src/mathlib/IceKey.cpp
diff options
context:
space:
mode:
authorMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
committerMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
commit55ed12f8d1eb6887d348be03aee5573d44177ffb (patch)
tree3686f7ca78c780cd9a3d367b79a9d9250c1be7c0 /mp/src/mathlib/IceKey.cpp
parent* Added support for Visual C++ 2013 Express to VPC (diff)
downloadsource-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.tar.xz
source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.zip
Updated the SDK with the latest code from the TF and HL2 branches.
Diffstat (limited to 'mp/src/mathlib/IceKey.cpp')
-rw-r--r--mp/src/mathlib/IceKey.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/mp/src/mathlib/IceKey.cpp b/mp/src/mathlib/IceKey.cpp
index e739ce6f..c03c72fe 100644
--- a/mp/src/mathlib/IceKey.cpp
+++ b/mp/src/mathlib/IceKey.cpp
@@ -60,11 +60,11 @@ static const int ice_keyrot[16] = {
static unsigned int
gf_mult (
- register unsigned int a,
- register unsigned int b,
- register unsigned int m
+ unsigned int a,
+ unsigned int b,
+ unsigned int m
) {
- register unsigned int res = 0;
+ unsigned int res = 0;
while (b) {
if (b & 1)
@@ -88,10 +88,10 @@ gf_mult (
static unsigned long
gf_exp7 (
- register unsigned int b,
+ unsigned int b,
unsigned int m
) {
- register unsigned int x;
+ unsigned int x;
if (b == 0)
return (0);
@@ -109,10 +109,10 @@ gf_exp7 (
static unsigned long
ice_perm32 (
- register unsigned long x
+ unsigned long x
) {
- register unsigned long res = 0;
- register const unsigned long *pbox = ice_pbox;
+ unsigned long res = 0;
+ const unsigned long *pbox = ice_pbox;
while (x) {
if (x & 1)
@@ -133,7 +133,7 @@ ice_perm32 (
static void
ice_sboxes_init (void)
{
- register int i;
+ int i;
for (i=0; i<1024; i++) {
int col = (i >> 1) & 0xff;
@@ -202,7 +202,7 @@ IceKey::~IceKey ()
static unsigned long
ice_f (
- register unsigned long p,
+ unsigned long p,
const IceSubkey *sk
) {
unsigned long tl, tr; /* Expanded 40-bit values */
@@ -240,8 +240,8 @@ IceKey::encrypt (
unsigned char *ctext
) const
{
- register int i;
- register unsigned long l, r;
+ int i;
+ unsigned long l, r;
l = (((unsigned long) ptext[0]) << 24)
| (((unsigned long) ptext[1]) << 16)
@@ -275,8 +275,8 @@ IceKey::decrypt (
unsigned char *ptext
) const
{
- register int i;
- register unsigned long l, r;
+ int i;
+ unsigned long l, r;
l = (((unsigned long) ctext[0]) << 24)
| (((unsigned long) ctext[1]) << 16)
@@ -313,20 +313,20 @@ IceKey::scheduleBuild (
int i;
for (i=0; i<8; i++) {
- register int j;
- register int kr = keyrot[i];
+ int j;
+ int kr = keyrot[i];
IceSubkey *isk = &_keysched[n + i];
for (j=0; j<3; j++)
isk->val[j] = 0;
for (j=0; j<15; j++) {
- register int k;
+ int k;
unsigned long *curr_sk = &isk->val[j % 3];
for (k=0; k<4; k++) {
unsigned short *curr_kb = &kb[(kr + k) & 3];
- register int bit = *curr_kb & 1;
+ int bit = *curr_kb & 1;
*curr_sk = (*curr_sk << 1) | bit;
*curr_kb = (*curr_kb >> 1) | ((bit ^ 1) << 15);