본문 바로가기

Native

blowfish [code] /** * @file CBlowfish.h * @author cheol-dong, Choi * @version 0.1 * * @section LICENSE * * Copyright (c) 2003-2010, cheol-dong choi, (http://www.sarangnamu.net) * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation.. 더보기
c++0x [code] template using Vec = vector; Vec v = { 2.3, 1.2, 6.7, 4.5 }; sort(v); for(auto p = v.begin(); p!=v.end(); ++p) cout 더보기
cppunit http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page 더보기
leak detector http://valgrind.org/docs/manual/quick-start.html#quick-start.intro [code] valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./test [/code] http://www.andreasen.org/LeakTracer/ 더보기
unit test tools http://www.devpia.com/Maeul/Contents/Detail.aspx?BoardID=4244&MAEULNO=4&no=31527&page=1 C/C++ unit testing tools 소개 합니다. 주로 C/C++ 용 입니다. 참고 하세요.... For those projects hosted on SourceForge, the project activity data is updated weekly using live newsfeeds powered by CaRP C Unit Test System http://sourceforge.net/projects/cut/ Description: CUT is a simple, to-the-point unit testing system. It's di.. 더보기
mutex , critical section, semaphore Object When Nonsignaled When Signaled Successful Wait Side Effect Semaphore Successful wait When count>0 (ReleaseSemaphore) Decrements count by 1 커널 모드 객체가 아님 Mutex Successful wait When unowned by a thread (ReleaseMutex) Gives ownership to thread 크리티컬 섹션보다 느리지만 프로세스를 넘어서 모든 스레드에서 사용 가능 (커널모드 동기화 객체) Critical Successful wait (EnterCriticalSection) When unowned by a thread (LeaveCriticalSection) G.. 더보기
openssl sha1 http://en.wikipedia.org/wiki/SHA-1 Example hashes Main article: Examples of SHA digests The following is an example of SHA-1 digests. ASCII encoding is assumed for all messages. [code] SHA1("The quick brown fox jumps over the lazy dog") = 2fd4e1c6 7a2d28fc ed849ee1 bb76e739 1b93eb12 [/code] Even a small change in the message will, with overwhelming probability, result in a completely different h.. 더보기
adding color to vim and cygwin http://raibledesigns.com/rd/entry/adding_color_to_vim_and in .vimrc [code] " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif [/code] in .bashrc [code] alias ls="ls -CF --color" [/code] 더보기
pkcs padding pkcs 를 적용하기 위해서는 2가지를 알아야 된다. 1. buffer 전체 크기 2. plain text 의 길이 즉 padding = buffer size - plain text length 여기서 memset(bufferPtr + plainTextLen, padding, padding); 으로 채우면 되는 것이다. 풀이하면 buffer 내용이 있는 부분을 제외한 부분을 padding 값으로 채우는 것. 더보기
Block cipher modes of operation http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29 더보기