diff options
| author | jsing <> | 2024-03-29 05:03:48 +0000 |
|---|---|---|
| committer | jsing <> | 2024-03-29 05:03:48 +0000 |
| commit | 55e5787cb0bc4e62cca6c092e03eb10b2f12b700 (patch) | |
| tree | 39750254fab8b5a642a398b804a8bd3c1959fef1 /src | |
| parent | f2f239753afe93df4bf0c43d69b6fdc0b7625ec6 (diff) | |
| download | openbsd-55e5787cb0bc4e62cca6c092e03eb10b2f12b700.tar.gz openbsd-55e5787cb0bc4e62cca6c092e03eb10b2f12b700.tar.bz2 openbsd-55e5787cb0bc4e62cca6c092e03eb10b2f12b700.zip | |
Remove unused n2ln, l2nn, n2l and l2n macros.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/rc2/rc2_local.h | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/src/lib/libcrypto/rc2/rc2_local.h b/src/lib/libcrypto/rc2/rc2_local.h index 64c9c5388d..dd5598760e 100644 --- a/src/lib/libcrypto/rc2/rc2_local.h +++ b/src/lib/libcrypto/rc2/rc2_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rc2_local.h,v 1.2 2023/07/07 08:29:37 beck Exp $ */ | 1 | /* $OpenBSD: rc2_local.h,v 1.3 2024/03/29 05:03:48 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -101,49 +101,6 @@ | |||
| 101 | } \ | 101 | } \ |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /* NOTE - c is not incremented as per n2l */ | ||
| 105 | #define n2ln(c,l1,l2,n) { \ | ||
| 106 | c+=n; \ | ||
| 107 | l1=l2=0; \ | ||
| 108 | switch (n) { \ | ||
| 109 | case 8: l2 =((unsigned long)(*(--(c)))) ; \ | ||
| 110 | case 7: l2|=((unsigned long)(*(--(c))))<< 8; \ | ||
| 111 | case 6: l2|=((unsigned long)(*(--(c))))<<16; \ | ||
| 112 | case 5: l2|=((unsigned long)(*(--(c))))<<24; \ | ||
| 113 | case 4: l1 =((unsigned long)(*(--(c)))) ; \ | ||
| 114 | case 3: l1|=((unsigned long)(*(--(c))))<< 8; \ | ||
| 115 | case 2: l1|=((unsigned long)(*(--(c))))<<16; \ | ||
| 116 | case 1: l1|=((unsigned long)(*(--(c))))<<24; \ | ||
| 117 | } \ | ||
| 118 | } | ||
| 119 | |||
| 120 | /* NOTE - c is not incremented as per l2n */ | ||
| 121 | #define l2nn(l1,l2,c,n) { \ | ||
| 122 | c+=n; \ | ||
| 123 | switch (n) { \ | ||
| 124 | case 8: *(--(c))=(unsigned char)(((l2) )&0xff);\ | ||
| 125 | case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff);\ | ||
| 126 | case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff);\ | ||
| 127 | case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff);\ | ||
| 128 | case 4: *(--(c))=(unsigned char)(((l1) )&0xff);\ | ||
| 129 | case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff);\ | ||
| 130 | case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff);\ | ||
| 131 | case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff);\ | ||
| 132 | } \ | ||
| 133 | } | ||
| 134 | |||
| 135 | #undef n2l | ||
| 136 | #define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \ | ||
| 137 | l|=((unsigned long)(*((c)++)))<<16L, \ | ||
| 138 | l|=((unsigned long)(*((c)++)))<< 8L, \ | ||
| 139 | l|=((unsigned long)(*((c)++)))) | ||
| 140 | |||
| 141 | #undef l2n | ||
| 142 | #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ | ||
| 143 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 144 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 145 | *((c)++)=(unsigned char)(((l) )&0xff)) | ||
| 146 | |||
| 147 | #define C_RC2(n) \ | 104 | #define C_RC2(n) \ |
| 148 | t=(x0+(x1& ~x3)+(x2&x3)+ *(p0++))&0xffff; \ | 105 | t=(x0+(x1& ~x3)+(x2&x3)+ *(p0++))&0xffff; \ |
| 149 | x0=(t<<1)|(t>>15); \ | 106 | x0=(t<<1)|(t>>15); \ |
