Created 11/25/2013 Minli Zhu
Modified Jan Lindström jan.lindstrom@mariadb.com
MDEV-11782: Rewritten for MariaDB 10.2 by Marko Mäkelä, MariaDB Corporation.
*******************************************************/ #pragma once
#include"log0log.h"
/** innodb_encrypt_log: whether to encrypt the redo log */ extern my_bool srv_encrypt_log;
/** Initialize the redo log encryption key and random parameters whencreatinganewredolog. Therandomparameterswillbepersistedinthelogheader. @seelog_crypt_write_header() @seelog_crypt_read_header()
@return whether the operation succeeded */ bool log_crypt_init();
/** Add the encryption information to the log header buffer. @parambufpartoflogheaderbuffer
@param archive the expected value of innodb_log_archive */ void log_crypt_write_header(byte *buf, bool archive) noexcept;
/** Read the encryption information from a redo log checkpoint buffer. @parambufpartofcheckpointbuffer @paramarchivetheexpectedvalueofinnodb_log_archive
@return whether the operation was successful */ bool log_crypt_read_header(const byte *buf, bool archive) noexcept;
/** Read the MariaDB 10.1 checkpoint crypto (version, msg and iv) info. @param[in]bufcheckpointbuffer
@return whether the operation was successful */
ATTRIBUTE_COLD bool log_crypt_101_read_checkpoint(const byte* buf);
/** Decrypt a MariaDB 10.1 redo log block. @param[in,out]buflogblock @param[in]start_lsnserverstartLSN
@return whether the decryption was successful */
ATTRIBUTE_COLD bool log_crypt_101_read_block(byte* buf, lsn_t start_lsn);
/** Read the checkpoint crypto (version, msg and iv) info. @param[in]bufcheckpointbuffer
@return whether the operation was successful */
ATTRIBUTE_COLD bool log_crypt_read_checkpoint_buf(const byte* buf);
/** Decrypt part of a log record. @paramivinitializationvector @parambufbufferforthedecrypteddata @paramdatatheencrypteddata @paramlenlengthofthedata,inbytes
@return buf */
byte *log_decrypt_buf(const byte *iv, byte *buf, const byte *data, uint len);
/** Decrypt a mini-transaction in place. @parambufstartofthemini-transaction
@param end end of data (followed by sequence byte and the 8-byte nonce) */ void log_decrypt_mtr(byte *buf, const byte *end) noexcept;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.