摘要:        
1、简单的加解密 Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL)); std::string val("I love karen!"); std::string enc = pCipher->encryptString(val); std::string dec = pCipher->decryptString(enc); std::cout<<"加密后:...    阅读全文
        
            posted @ 2012-09-04 16:32
lovemu
阅读(3114)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1 int main(const std::vector<std::string>& args) 2 { 3 /*TO DO*/ 4 Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256")); 5 6 std::string in("I love karen!"); 7 std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64...    阅读全文
        
            posted @ 2012-09-04 14:48
lovemu
阅读(4231)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1 int main(const std::vector<std::string>& args) 2 { 3 Timer timer; 4 Timestamp time; 5 TimerTask::Ptr pTask = new TimerTaskAdapter<LovemuApp>(*this,&LovemuApp::onTimer); 6 timer.schedule(pTask,500,500);//每2.5s执行一次timer动作 7 _event.wait(); 8...    阅读全文
        
            posted @ 2012-09-04 11:02
lovemu
阅读(3534)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号