MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / compress_rounds

Function compress_rounds

extra/yassl/src/yassl_imp.cpp:1123–1143  ·  view source on GitHub ↗

do compression rounds on dummy data

Source from the content-addressed store, hash-verified

1121
1122// do compression rounds on dummy data
1123static inline void compress_rounds(SSL& ssl, int rounds, const byte* dummy)
1124{
1125 if (rounds) {
1126 Digest* digest = NULL;
1127
1128 MACAlgorithm ma = ssl.getSecurity().get_parms().mac_algorithm_;
1129 if (ma == sha)
1130 digest = NEW_YS SHA;
1131 else if (ma == md5)
1132 digest = NEW_YS MD5;
1133 else if (ma == rmd)
1134 digest = NEW_YS RMD;
1135 else
1136 return;
1137
1138 for (int i = 0; i < rounds; i++)
1139 digest->update(dummy, COMPRESS_LOWER);
1140
1141 ysDelete(digest);
1142 }
1143}
1144
1145
1146// timing resistant pad verification

Callers 1

timing_verifyFunction · 0.85

Calls 3

ysDeleteFunction · 0.85
get_parmsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected