Definition at line 1256 of file mlogger.cxx.
◆ WriterSHA512()
Definition at line 1259 of file mlogger.cxx.
1260 {
1262 printf(
"WriterSHA512: path [%s], level %d\n", log_chn->
path.c_str(), level);
1263
1264 assert(wr != NULL);
1265
1268
1270 }
mbedtls_sha512_context fCtx
void mbedtls_sha512_init(mbedtls_sha512_context *ctx)
Initialize SHA-512 context.
◆ ~WriterSHA512()
| WriterSHA512::~WriterSHA512 |
( |
| ) |
|
|
inline |
Definition at line 1272 of file mlogger.cxx.
1273 {
1275 printf("WriterSHA512: destructor\n");
1277
1279 }
void mbedtls_sha512_free(mbedtls_sha512_context *ctx)
Clear SHA-512 context.
◆ toHex()
| std::string WriterSHA512::toHex |
( |
unsigned char |
c | ) |
|
|
inline |
Definition at line 1323 of file mlogger.cxx.
1324 {
1325 char s[3];
1326 sprintf(s,
"%02x",
c);
1327 return s;
1328 }
◆ toString()
| std::string WriterSHA512::toString |
( |
const unsigned char |
sha512sum[64] | ) |
|
|
inline |
Definition at line 1330 of file mlogger.cxx.
1331 {
1332 std::string s;
1333 for (
int i=0;
i<64;
i++)
1334 s +=
toHex(sha512sum[
i]);
1335 return s;
1336 }
std::string toHex(unsigned char c)
◆ wr_close()
| int WriterSHA512::wr_close |
( |
LOG_CHN * |
log_chn, |
|
|
int |
run_number |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 1338 of file mlogger.cxx.
1339 {
1341 std::string f = x + ".sha512";
1342
1344 printf(
"WriterSHA512: close path [%s], level %d, file [%s]\n", log_chn->
path.c_str(),
fLevel, f.c_str());
1345
1347
1348 unsigned char sha512sum[64];
1350
1351
1352
1353
1355
1358 cm_msg(
MERROR,
"WriterSHA512::wr_close",
"Cannot write SHA-512 checksum to file \'%s\', fopen() errno %d (%s)", f.c_str(), errno, strerror(errno));
1359 } else {
1362 }
1363
1364
1365
1367
1370
1373 }
1374
1376 }
virtual int wr_close(LOG_CHN *log_chn, int run_number)=0
std::string toString(const unsigned char sha512sum[64])
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
static FILE * fopen_wx(const char *filename)
static std::string xpathname(const char *xpath, int level)
void mbedtls_sha512_finish(mbedtls_sha512_context *ctx, unsigned char output[64])
SHA-512 final digest.
◆ wr_get_chain()
| std::string WriterSHA512::wr_get_chain |
( |
| ) |
|
|
inlinevirtual |
◆ wr_get_file_ext()
| std::string WriterSHA512::wr_get_file_ext |
( |
| ) |
|
|
inlinevirtual |
◆ wr_open()
| int WriterSHA512::wr_open |
( |
LOG_CHN * |
log_chn, |
|
|
int |
run_number |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 1281 of file mlogger.cxx.
1282 {
1284
1286 printf(
"WriterSHA512: open path [%s], level %d\n", log_chn->
path.c_str(),
fLevel);
1287
1289
1292
1295 }
1296
1298
1300
1302 }
virtual int wr_open(LOG_CHN *log_chn, int run_number)=0
void mbedtls_sha512_starts(mbedtls_sha512_context *ctx, int is384)
SHA-512 context setup.
◆ wr_write()
| int WriterSHA512::wr_write |
( |
LOG_CHN * |
log_chn, |
|
|
const void * |
data, |
|
|
const int |
size |
|
) |
| |
|
inlinevirtual |
Implements WriterInterface.
Definition at line 1304 of file mlogger.cxx.
1305 {
1307 printf(
"WriterSHA512: write path [%s], size %d\n", log_chn->
path.c_str(), size);
1308
1310
1312
1315
1318 }
1319
1321 }
virtual int wr_write(LOG_CHN *log_chn, const void *data, const int size)=0
void mbedtls_sha512_update(mbedtls_sha512_context *ctx, const unsigned char *input, size_t ilen)
SHA-512 process buffer.
◆ fCtx
◆ fLevel
◆ fWr
The documentation for this class was generated from the following file: