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에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 77 | 20년 전 | 2927 | ||
| 76 | 20년 전 | 6218 | ||
| 75 | 20년 전 | 4460 | ||
| 74 | 20년 전 | 5761 | ||
| 73 | 20년 전 | 3629 | ||
| 72 | 20년 전 | 5953 | ||
| 71 | 20년 전 | 3110 | ||
| 70 | 20년 전 | 2835 | ||
| 69 | 20년 전 | 2639 | ||
| 68 | 20년 전 | 2450 | ||
| 67 | 20년 전 | 2652 | ||
| 66 | 20년 전 | 2668 | ||
| 65 | 20년 전 | 3799 | ||
| 64 | 20년 전 | 2811 | ||
| 63 | 20년 전 | 2402 | ||
| 62 | 20년 전 | 2259 | ||
| 61 | 20년 전 | 3040 | ||
| 60 | 20년 전 | 3108 | ||
| 59 | 20년 전 | 2488 | ||
| 58 | 20년 전 | 2575 | ||
| 57 | 20년 전 | 2952 | ||
| 56 | 20년 전 | 2253 | ||
| 55 | 20년 전 | 2726 | ||
| 54 | 20년 전 | 2103 | ||
| 53 | 20년 전 | 2333 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기