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

Method Encode

extra/yassl/taocrypt/src/coding.cpp:73–91  ·  view source on GitHub ↗

Hex Encode

Source from the content-addressed store, hash-verified

71
72// Hex Encode
73void HexEncoder::Encode()
74{
75 word32 bytes = plain_.size();
76 encoded_.New(bytes * 2);
77
78 word32 i = 0;
79
80 while (bytes--) {
81 byte p = plain_.next();
82
83 byte b = p >> 4;
84 byte b2 = p & 0xF;
85
86 encoded_[i++] = hexEncode[b];
87 encoded_[i++] = hexEncode[b2];
88 }
89
90 plain_.reset(encoded_);
91}
92
93
94// Hex Decode

Callers 9

EncodeDSA_SignatureFunction · 0.80
GeneratePrivateMethod · 0.80
GeneratePublicMethod · 0.80
AgreeMethod · 0.80
SSL_DecryptFunction · 0.80
SignMethod · 0.80
EncryptMethod · 0.80
DecryptMethod · 0.80
get_parmsMethod · 0.80

Calls 4

NewMethod · 0.80
sizeMethod · 0.45
nextMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected