Commit 3f9b5053bae1a6d74e1f11fa004f26f1341a2979

Authored by Jay Berkenbilt
1 parent 2dc26338

Format code

libqpdf/QPDF.cc
... ... @@ -1285,7 +1285,6 @@ QPDF::readTrailer()
1285 1285 return object;
1286 1286 }
1287 1287  
1288   -
1289 1288 QPDFObjectHandle
1290 1289 QPDF::readObject(std::string const& description, QPDFObjGen og)
1291 1290 {
... ...
libqpdf/rijndael.cc
... ... @@ -848,9 +848,9 @@ void rijndaelEncrypt(const u32 *rk, unsigned int nrounds,
848 848 u8 ciphertext[16])
849 849 {
850 850 u32 s0, s1, s2, s3, t0, t1, t2, t3;
851   - #ifndef FULL_UNROLL
  851 +#ifndef FULL_UNROLL
852 852 int r;
853   - #endif /* ?FULL_UNROLL */
  853 +#endif /* ?FULL_UNROLL */
854 854 /*
855 855 * map byte array block to cipher state
856 856 * and add initial round key:
... ... @@ -859,7 +859,7 @@ void rijndaelEncrypt(const u32 *rk, unsigned int nrounds,
859 859 s1 = GETU32(plaintext + 4) ^ rk[1];
860 860 s2 = GETU32(plaintext + 8) ^ rk[2];
861 861 s3 = GETU32(plaintext + 12) ^ rk[3];
862   - #ifdef FULL_UNROLL
  862 +#ifdef FULL_UNROLL
863 863 /* round 1: */
864 864 t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4];
865 865 t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5];
... ... @@ -932,7 +932,7 @@ void rijndaelEncrypt(const u32 *rk, unsigned int nrounds,
932 932 }
933 933 }
934 934 rk += nrounds << 2;
935   - #else /* !FULL_UNROLL */
  935 +#else /* !FULL_UNROLL */
936 936 /*
937 937 * nrounds - 1 full rounds:
938 938 */
... ... @@ -991,7 +991,7 @@ void rijndaelEncrypt(const u32 *rk, unsigned int nrounds,
991 991 Te3[(t2 ) & 0xff] ^
992 992 rk[3];
993 993 }
994   - #endif /* ?FULL_UNROLL */
  994 +#endif /* ?FULL_UNROLL */
995 995 /*
996 996 * apply last round and
997 997 * map cipher state to byte array block:
... ... @@ -1031,9 +1031,9 @@ void rijndaelDecrypt(const u32 *rk, unsigned int nrounds,
1031 1031 u8 plaintext[16])
1032 1032 {
1033 1033 u32 s0, s1, s2, s3, t0, t1, t2, t3;
1034   - #ifndef FULL_UNROLL
  1034 +#ifndef FULL_UNROLL
1035 1035 int r;
1036   - #endif /* ?FULL_UNROLL */
  1036 +#endif /* ?FULL_UNROLL */
1037 1037  
1038 1038 /*
1039 1039 * map byte array block to cipher state
... ... @@ -1043,7 +1043,7 @@ void rijndaelDecrypt(const u32 *rk, unsigned int nrounds,
1043 1043 s1 = GETU32(ciphertext + 4) ^ rk[1];
1044 1044 s2 = GETU32(ciphertext + 8) ^ rk[2];
1045 1045 s3 = GETU32(ciphertext + 12) ^ rk[3];
1046   - #ifdef FULL_UNROLL
  1046 +#ifdef FULL_UNROLL
1047 1047 /* round 1: */
1048 1048 t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4];
1049 1049 t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5];
... ... @@ -1116,7 +1116,7 @@ void rijndaelDecrypt(const u32 *rk, unsigned int nrounds,
1116 1116 }
1117 1117 }
1118 1118 rk += nrounds << 2;
1119   - #else /* !FULL_UNROLL */
  1119 +#else /* !FULL_UNROLL */
1120 1120 /*
1121 1121 * nrounds - 1 full rounds:
1122 1122 */
... ... @@ -1175,7 +1175,7 @@ void rijndaelDecrypt(const u32 *rk, unsigned int nrounds,
1175 1175 Td3[(t0 ) & 0xff] ^
1176 1176 rk[3];
1177 1177 }
1178   - #endif /* ?FULL_UNROLL */
  1178 +#endif /* ?FULL_UNROLL */
1179 1179 /*
1180 1180 * apply last round and
1181 1181 * map cipher state to byte array block:
... ...