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

Method CBC_Encrypt

extra/yassl/taocrypt/include/modes.hpp:119–130  ·  view source on GitHub ↗

CBC Encrypt

Source from the content-addressed store, hash-verified

117
118// CBC Encrypt
119inline void Mode_BASE::CBC_Encrypt(byte* out, const byte* in, word32 sz)
120{
121 word32 blocks = sz / blockSz_;
122
123 while (blocks--) {
124 xorbuf(reg_, in, blockSz_);
125 ProcessAndXorBlock(reg_, 0, reg_);
126 memcpy(out, reg_, blockSz_);
127 out += blockSz_;
128 in += blockSz_;
129 }
130}
131
132
133// CBC Decrypt

Callers

nothing calls this directly

Calls 1

xorbufFunction · 0.85

Tested by

no test coverage detected