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

Function pad_check

extra/yassl/src/yassl_imp.cpp:1076–1092  ·  view source on GitHub ↗

check bytes for pad value

Source from the content-addressed store, hash-verified

1074
1075// check bytes for pad value
1076static int pad_check(const byte* input, byte pad, int len)
1077{
1078 int good = 0;
1079 int bad = 0;
1080
1081 for (int i = 0; i < len; i++) {
1082 if (input[i] == pad)
1083 good++;
1084 else
1085 bad++;
1086 }
1087
1088 if (good == len)
1089 return 0;
1090 else
1091 return 0 - bad; // failure
1092}
1093
1094
1095// get number of compression rounds

Callers 1

timing_verifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected