easyVim  1.0
a simple vim-like text editor
Enumerations | Functions
encrypt.hpp File Reference

easyVim加密解密模块 More...

#include <string>
#include <vector>
Include dependency graph for encrypt.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ev::EV_ENCRYPT_TYPE { ev::EV_ENCRYPT_AES_BEGIN = 0 , ev::EV_ENCRYPT_AES_NBEGIN = 1 }
 
enum  ev::EV_DECRYPT_TYPE { ev::EV_DECRYPT_AES_BEGIN = 0 , ev::EV_DECRYPT_AES_NBEGIN = 1 }
 

Functions

bool ev::encrypt (std::vector< std::string > *input, std::vector< std::string > *output, std::string key, EV_ENCRYPT_TYPE evType)
 
bool ev::decrypt (std::vector< std::string > *input, std::vector< std::string > *output, std::string key, EV_DECRYPT_TYPE evType)
 
std::string ev::md5 (std::string input)
 
void ev::aes_encrypt (std::vector< std::string > *input, std::vector< std::string > *output, std::string key)
 
void ev::aes_decrypt (std::vector< std::string > *input, std::vector< std::string > *output, std::string key)
 

Detailed Description

easyVim加密解密模块

定义了easyVim用于加密解密的相关函数和类

Author
Super@redhecker

Enumeration Type Documentation

◆ EV_DECRYPT_TYPE

Enumerator
EV_DECRYPT_AES_BEGIN 

使用aes解密算法,并且识别第一行的MD5,若识别失败则不解密

EV_DECRYPT_AES_NBEGIN 

直接使用aes解密算法

◆ EV_ENCRYPT_TYPE

Enumerator
EV_ENCRYPT_AES_BEGIN 

使用aes加密算法,并且在第一行增加密钥MD5进行识别

EV_ENCRYPT_AES_NBEGIN 

使用aes加密算法,但是不保存密钥MD5

Function Documentation

◆ aes_encrypt()

void ev::aes_encrypt ( std::vector< std::string > *  input,
std::vector< std::string > *  output,
std::string  key 
)

@function aes128位加密算法

◆ decrypt()

bool ev::decrypt ( std::vector< std::string > *  input,
std::vector< std::string > *  output,
std::string  key,
EV_DECRYPT_TYPE  evType = EV_DECRYPT_AES_BEGIN 
)

@function 解密接口

◆ encrypt()

bool ev::encrypt ( std::vector< std::string > *  input,
std::vector< std::string > *  output,
std::string  key,
EV_ENCRYPT_TYPE  evType = EV_ENCRYPT_AES_BEGIN 
)

@function 加密接口

◆ md5()

std::string ev::md5 ( std::string  input)

@function md5加密算法