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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5027 | 12년 전 | 3018 | ||
| 5026 | 12년 전 | 2693 | ||
| 5025 | 12년 전 | 3295 | ||
| 5024 | 12년 전 | 1018 | ||
| 5023 | 12년 전 | 841 | ||
| 5022 | 12년 전 | 2016 | ||
| 5021 | 12년 전 | 1509 | ||
| 5020 | 12년 전 | 1104 | ||
| 5019 | 12년 전 | 2096 | ||
| 5018 |
프로프리랜서
|
12년 전 | 1319 | |
| 5017 |
프로프리랜서
|
12년 전 | 792 | |
| 5016 |
프로프리랜서
|
12년 전 | 1327 | |
| 5015 |
프로프리랜서
|
12년 전 | 832 | |
| 5014 |
프로프리랜서
|
12년 전 | 1214 | |
| 5013 | 12년 전 | 3764 | ||
| 5012 | 12년 전 | 3934 | ||
| 5011 | 12년 전 | 1363 | ||
| 5010 | 12년 전 | 3849 | ||
| 5009 | 12년 전 | 2521 | ||
| 5008 | 12년 전 | 2236 | ||
| 5007 |
|
12년 전 | 1279 | |
| 5006 | 12년 전 | 1635 | ||
| 5005 | 12년 전 | 5156 | ||
| 5004 | 12년 전 | 1477 | ||
| 5003 |
|
12년 전 | 2092 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기