<?php

    // equivalent to MySQL's OLD_PASSWORD() function
    function shittyPassword($input, $hex = true) {
        $nr    = 1345345333;
        $add   = 7;
        $nr2   = 0x12345671;
        $tmp   = null;
        $inlen = strlen($input);
        for ($i = 0; $i < $inlen; $i++) {
            $byte = substr($input, $i, 1);
            if ($byte == ' ' || $byte == "\t") {
                continue;
            }
            $tmp = ord($byte);
            $nr ^= ((($nr & 63) + $add) * $tmp) + (($nr << 8) & 0xFFFFFFFF);
            $nr2 += (($nr2 << 8) & 0xFFFFFFFF) ^ $nr;
            $add += $tmp;
        }
        $out_a  = $nr & ((1 << 31) - 1);
        $out_b  = $nr2 & ((1 << 31) - 1);
        $output = sprintf("%08x%08x", $out_a, $out_b);
        if ($hex) {
            return $output;
        }

        return hexHashToBin($output);
    }

    function hexHashToBin($hex) {
        $bin = "";
        $len = strlen($hex);
        for ($i = 0; $i < $len; $i += 2) {
            $byte_hex  = substr($hex, $i, 2);
            $byte_dec  = hexdec($byte_hex);
            $byte_char = chr($byte_dec);
            $bin .= $byte_char;
        }

        return $bin;
    }
    
    $hash = shittyPassword('whatislove');
    echo $hash;

'PHP 프로그래밍' 카테고리의 다른 글

https ssl 보안인증 적용후 스마트에디터 DHTML 안되는 문제해결  (0) 2018.05.19
PHPEXCEL 다운로드  (0) 2018.03.05
include 파악  (0) 2018.02.01
CMS  (0) 2018.01.14
PHP 이카운트 연동  (0) 2018.01.14

http://fancybox.net/

 

Fancybox - Fancy jQuery lightbox alternative

What is it? FancyBox is a tool for displaying images, html content and multi-media in a Mac-style "lightbox" that floats overtop of web page. It was built using the jQuery library. Licensed under both MIT and GPL licenses Features Can display images, HTML

fancybox.net

'자바스크립트' 카테고리의 다른 글

jquery UI  (1) 2023.10.18
jquery 슬라이드 추천  (0) 2023.10.18
jquery 툴팁  (0) 2023.10.18
모달 tinggle.js  (0) 2018.01.25
jquery - select option 선택값 가져오기  (0) 2018.01.22

https://api.jqueryui.com/accordion/#entry-examples

 

Accordion Widget | jQuery UI API Documentation

Description: Convert a pair of headers and content panels into an accordion. The markup of your accordion container needs pairs of headers and content panels: 1 2 3 4 5 6 First content panel Second content panel Accordions support arbitrary markup, but eac

api.jqueryui.com

 

Accordion Widget

 

Accordion Widget | jQuery UI API Documentation

Description: Convert a pair of headers and content panels into an accordion. The markup of your accordion container needs pairs of headers and content panels: 1 2 3 4 5 6 First content panel Second content panel Accordions support arbitrary markup, but eac

api.jqueryui.com

Tabs Widget

'자바스크립트' 카테고리의 다른 글

jquery 갤러리  (0) 2023.10.18
jquery 슬라이드 추천  (0) 2023.10.18
jquery 툴팁  (0) 2023.10.18
모달 tinggle.js  (0) 2018.01.25
jquery - select option 선택값 가져오기  (0) 2018.01.22

+ Recent posts