Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
fb473bc6
Commit
fb473bc6
authored
22 years ago
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unsafe macro definitions (which were producing incorrect code,
leading to compile warnings).
parent
da2e0dde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
contrib/pgcrypto/rijndael.c
contrib/pgcrypto/rijndael.c
+15
-5
No files found.
contrib/pgcrypto/rijndael.c
View file @
fb473bc6
...
...
@@ -259,6 +259,7 @@ gen_tabs(void)
#define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b)
#define imix_col(y,x) \
do { \
u = star_x(x); \
v = star_x(u); \
w = star_x(v); \
...
...
@@ -266,7 +267,8 @@ gen_tabs(void)
(y) = u ^ v ^ w; \
(y) ^= rotr(u ^ t, 8) ^ \
rotr(v ^ t, 16) ^ \
rotr(t,24)
rotr(t,24); \
} while (0)
/* initialise the key schedule from the user supplied key */
...
...
@@ -367,17 +369,21 @@ rijndael_set_key(rijndael_ctx * ctx, const u4byte * in_key, const u4byte key_len
/* encrypt a block of text */
#define f_nround(bo, bi, k) \
do { \
f_rn(bo, bi, 0, k); \
f_rn(bo, bi, 1, k); \
f_rn(bo, bi, 2, k); \
f_rn(bo, bi, 3, k); \
k += 4
k += 4; \
} while (0)
#define f_lround(bo, bi, k) \
do { \
f_rl(bo, bi, 0, k); \
f_rl(bo, bi, 1, k); \
f_rl(bo, bi, 2, k); \
f_rl(bo, bi, 3, k)
f_rl(bo, bi, 3, k); \
} while (0)
void
rijndael_encrypt
(
rijndael_ctx
*
ctx
,
const
u4byte
*
in_blk
,
u4byte
*
out_blk
)
...
...
@@ -427,17 +433,21 @@ rijndael_encrypt(rijndael_ctx * ctx, const u4byte * in_blk, u4byte * out_blk)
/* decrypt a block of text */
#define i_nround(bo, bi, k) \
do { \
i_rn(bo, bi, 0, k); \
i_rn(bo, bi, 1, k); \
i_rn(bo, bi, 2, k); \
i_rn(bo, bi, 3, k); \
k -= 4
k -= 4; \
} while (0)
#define i_lround(bo, bi, k) \
do { \
i_rl(bo, bi, 0, k); \
i_rl(bo, bi, 1, k); \
i_rl(bo, bi, 2, k); \
i_rl(bo, bi, 3, k)
i_rl(bo, bi, 3, k); \
} while (0)
void
rijndael_decrypt
(
rijndael_ctx
*
ctx
,
const
u4byte
*
in_blk
,
u4byte
*
out_blk
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment