Dreamgoing / DES

DES library c++ implement
2 stars 2 forks source link
des encryption

DES library

Data encryption standard

Brief

DES encrypt algorithm is Symmetric encryption.DES encryption library using c++ implement.When use in your project only include header file,and use public method.

How to use

DES.hpp & fileDES.hpp in src dictionary

DES:public function

DES is a static class, straightly use its public function.

fileDES:public function

FileDES is a common class,need an instance to use it.

Example

    FileDES des;
    des.setInput("../data/input.txt"); ///your input file path
    des.setOutput("../data/encrypt.txt",0); ///your encrypt output file path
    des.setKey("123456"); ///your key
    des.encryptFile(); ///encrypt file
    des.setOutput("../data/decrypt.txt",1); ///your decrypt output file path
    des.decryptFile(); ///decrypt file

Reference

DATA ENCRYPTION STANDARD (DES) fips-46-3