/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondCore/CondDB/interface/Cipher.h
40 строк
881 B
Cms Build
Clang-Format
29 май 2019, 08:23
29 май 2019, 08:23
087900c
Код
Авторство
О чём код?
#ifndef CondCore_CondDB_Cipher_h #define CondCore_CondDB_Cipher_h #include <iostream> #include <string> struct BLOWFISH_CTX; namespace cond { namespace auth { class Cipher { public: explicit Cipher(const std::string& key); ~Cipher(); size_t encrypt(const std::string& input, unsigned char*& output); std::string decrypt(const unsigned char* input, size_t inputSize); std::string b64encrypt(const std::string& input); std::string b64decrypt(const std::string& input); private: size_t bf_process_alloc(const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt = false); private: BLOWFISH_CTX* m_ctx; }; } // namespace auth } // namespace cond #endif // CondCore_CondDB_Cipher_h