암호화 원격컨트롤 소스 몇가지

Posted by 빵빵빵
2009/09/21 11:47 전산(컴퓨터)/PC-Windows



암호화 원격컨트롤 소스 몇가지

출처 : http://www.himini.com/zbxe/vc_pds/121/page/2
Crypto++(암호화 라이브러리)
암호화 알고리즘에 대한 모든 처리를 지원하는 public domain기반의 Free C++ 라이브러리입니다. 스타트랙 온라인에서 채택되어진 라이브러리이기도 하죠.
http://www.eskimo.com/~weidai/cryptlib.html
이곳에 가시면 참고자료가 있습니다.




출처 : http://www.himini.com/zbxe/vc_pds/112/page/2


Remote Control PCs

PC를 원격에서 조정할 수 있는 프로그램 소스입니다.
넷미팅의 바탕화면 공유와 비슷합니다.
파일은 서버 프로젝트와 클라이언트 프로젝트로 나뉘어져 있습니다.

1. To show an implementation of sockets version 2.0 programming.
2. To show how to write an object oriented C++ project using the Win 32 SDK.
3. To show how to mix C/C++ source code.
4. To show how to utilize a powerful component of Windows message handling using Message Crackers, in an object oriented environment.
5. To show how to capture a desktop display in a device dependant bitmap (DDB) format and convert it to a device independant bitmap (DIB) format.
6. To show how to implement two types of data compression schemes, in assembly language, that work well for graphics and are very fast.
7. To combine all these aspects together in a project that allows remote controlling of a remote pc.




출처 : http://www.himini.com/zbxe/vc_pds/104/page/2

Cryptest (MFC Style Crypto++ v4.2 Library GUI)
사용자 삽입 이미지

Crypto++ is a free C++ class library of cryptographic schemes. Currently the library consists of the following, some of which are other people's code, repackaged into classes.

*a class hierarchy with an API defined by abstract base classes
*Proposed AES (Rijndael) and other AES candidates: RC6, MARS, Twofish, Serpent, CAST-256
*other symmetric block ciphers: IDEA, DES, Triple DES (DES-EDE2 and DES-EDE3), DESX (DES-XEX3), RC2, RC5, Blowfish, Diamond2, TEA, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square, Skipjack
*generic cipher modes: CBC padded, CBC ciphertext stealing (CTS), CFB, OFB, counter mode
*stream ciphers: Panama, ARC4, SEAL, WAKE, Sapphire II, BlumBlumShub
*public key cryptography: RSA, DSA, ElGamal, Nyberg-Rueppel (NR), BlumGoldwasser, Rabin, Rabin-Williams (RW), LUC, LUCELG
*padding schemes for public-key systems: PKCS#1 v2.0, OAEP, PSSR, IEEE P1363 EMSA2
*key agreement schemes: Diffie-Hellman (DH), Unified Diffie-Hellman (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, XTR-DH
*elliptic curve cryptography: ECDSA, ECNR, ECIES, ECDHC, ECMQVC
*one-way hash functions: SHA-1, MD2, MD4, MD5, HAVAL, RIPEMD-160, Tiger, SHA-2 (SHA-256, SHA-384, and SHA-512), Panama
*message authentication codes: MD5-MAC, HMAC, XOR-MAC, CBC-MAC, DMAC
*cipher constructions based on hash functions: Luby-Rackoff, MDC
*pseudo random number generators (PRNG): ANSI X9.17 appendix C, PGP's RandPool
*Shamir's secret sharing scheme and Rabin's information dispersal algorithm (IDA)
*DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and zlib (RFC 1950) format support
*fast multi-precision integer (bignum) and polynomial operations
*finite field arithmetics, including GF(p) and GF(2^n)
*prime number generation and verification
*various miscellaneous modules such as base 64 coding and 32-bit CRC
*class wrappers for these operating system features (optional):
      - high resolution timers on Windows, Unix, and MacOS
      - Berkeley and Windows style sockets
      - Windows named pipes
      - /dev/random and /dev/urandom on Linux and FreeBSD
      - Microsoft's CryptGenRandom on Windows
*A high level interface for most of the above, using a filter/pipeline metaphor
*benchmarks and validation testing





암호화에 관한 추가 참고 사이트 : http://www.cryptopp.com/


2009/09/21 11:47 2009/09/21 11:47

MFC Tips 예제 소스

Posted by 빵빵빵
2009/09/21 11:14 전산(컴퓨터)/PC-Windows





2차 출처 : http://yagi815.tistory.com/505

2009/09/21 11:14 2009/09/21 11:14

엑셀( Excel ) 파일 생성 MFC API

Posted by 빵빵빵
2009/09/21 11:08 전산(컴퓨터)/PC-Windows




www.codeguru.com/cpp/data/mfc_database/microsoftexcel/article.php/c11745/ 의 내용에서 필요한 부분만 골랐습니다.

필요한 파일 4개이다.
    XLEzAutomation.h
    XLEzAutomation.cpp
    XLAutomation.h
    XLAutomation.cpp

함수를 구현할 파일에 한 줄을 추가한다.
    #include "XLEzAutomation.h"


엑셀 파일 기록하기(파일이 존재하지 않을 경우 새로운 파일이 생성된다.)

 void CWATExcelRWDlg::OnBnClickedButton1()
{
 char chThisPath[_MAX_PATH];
 GetCurrentDirectory( _MAX_PATH, chThisPath);
 
 UpdateData(TRUE);
 CString strThisPath ;
 strThisPath.Format("%s\\%s.xls",chThisPath,m_strFileName);

 CXLEzAutomation XL(FALSE); // FALSE: 처리 과정을 화면에 보이지 않는다


  XL.SetCellValue(1,1,"ddd");
 XL.SetCellValue(1,2,"22");
  XL.SetCellValue(4,4,"4,4");
  XL.SetCellValue(7,4,"7,4");
 XL.SaveFileAs(strThisPath);

 XL.ReleaseExcel();
}


엑셀파일 읽어오기

  char chThisPath[_MAX_PATH];
 GetCurrentDirectory( _MAX_PATH, chThisPath);

 UpdateData(TRUE);
 CString strThisPath ;
 CString strData;
 strThisPath.Format("%s\\%s.xls",chThisPath,m_strFileName);

 GetModuleFileName( NULL, chThisPath, _MAX_PATH);

 CXLEzAutomation XL(FALSE); // FALSE: 처리 과정을 화면에 보이지 않는다

 XL.OpenExcelFile(strThisPath);
 strData +="\n(1,1) = ";
 strData +=XL.GetCellValue(1,1);
 strData +="\n(1,2) = ";
 strData +=XL.GetCellValue(1,2);
 strData +="\n(1,3) = ";
 strData +=XL.GetCellValue(1,3);
 strData +="\n(1,4) = ";
 strData +=XL.GetCellValue(1,4);

 strData +="\n(4,4) = ";
 strData +=XL.GetCellValue(4,4);

 strData +="\n(7,4) = ";
 strData +=XL.GetCellValue(7,4);

 XL.ReleaseExcel();
 MessageBox(strData);



출처 : http://whiteat.com/zbxe/17858
2차출처 : http://yagi815.tistory.com/494
2009/09/21 11:08 2009/09/21 11:08