패스워드 하실떄 암호화 하실떄 사용하세요 ^^;
function EnCode($sText, $sCode) {
$cntData = strlen($sText) - 1;
$cntCode = strlen($sCode) - 1;
$arrData = array();
$arrCode = array();
for($i = 0;$cntData >= $i; $i++)
$arrData[$i] = $sText[$i];
for($i = 0;$cntCode >= $i; $i++)
$arrCode[$i] = $sCode[$i];
$flag = 0;
$strResult = "";
for($i = 0;$cntData >= $i; $i++) {
$strResult = $strResult . (ord($arrData[$i]) ^ ord($arrCode[$flag])) . chr(8);
if($flag == $cntCode)
$flag = 0;
else
$flag++;
}
return base64_encode($strResult);
}
$testKey = "asdjhhjksa";
$decodingData = EnCode($pw, $testKey);
댓글 2개
12년 전
양방향 암호화 함수면서
encode 는 있는데 decode 는 없는 슬픈 현실..
encode 는 있는데 decode 는 없는 슬픈 현실..
takumi22
12년 전
정보 감사합니다
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5186 | PHP |
swallow
|
2년 전 | 940 | |
| 5185 | PHP |
swallow
|
2년 전 | 960 | |
| 5184 | PHP |
swallow
|
2년 전 | 536 | |
| 5183 | PHP |
swallow
|
2년 전 | 840 | |
| 5182 | PHP |
swallow
|
2년 전 | 775 | |
| 5181 | 기타 |
swallow
|
2년 전 | 1017 | |
| 5180 | 2년 전 | 573 | |||
| 5179 | 기타 |
swallow
|
2년 전 | 1429 | |
| 5178 | PHP |
swallow
|
2년 전 | 794 | |
| 5177 | JavaScript |
swallow
|
2년 전 | 1485 | |
| 5176 | PHP |
swallow
|
2년 전 | 1183 | |
| 5175 | 2년 전 | 564 | |||
| 5174 | 기타 | 2년 전 | 810 | ||
| 5173 | PHP |
|
2년 전 | 964 | |
| 5172 | PHP |
|
2년 전 | 1251 | |
| 5171 | 기타 |
그누GPT
|
2년 전 | 1552 | |
| 5170 | PHP |
|
2년 전 | 1047 | |
| 5169 | PHP |
|
2년 전 | 1222 | |
| 5168 | PHP |
|
2년 전 | 1197 | |
| 5167 | JavaScript |
|
2년 전 | 994 | |
| 5166 | MySQL | 2년 전 | 1184 | ||
| 5165 | MySQL | 2년 전 | 1250 | ||
| 5164 | PHP | 2년 전 | 1499 | ||
| 5163 | OS |
|
2년 전 | 839 | |
| 5162 | 웹서버 |
|
2년 전 | 888 | |
| 5161 | 웹서버 |
|
2년 전 | 972 | |
| 5160 | PHP |
|
2년 전 | 842 | |
| 5159 | PHP |
|
2년 전 | 903 | |
| 5158 | PHP |
|
2년 전 | 912 | |
| 5157 | PHP |
|
2년 전 | 941 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기