V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
50vip
V2EX  ›  程序员

之前学 PHP 做的一个小玩意——Dig Hash

  •  
  •   50vip · 2015-12-04 13:11:02 +08:00 · 2206 次点击
    这是一个创建于 3071 天前的主题,其中的信息可能已经有所发展或是发生改变。

    说明

    使用 PHP 的 Slim 框架做的,计算一个字符串的各种不同 Hash 算法的值和长度,还付了一个随机颜色。

    做完之后,我真的觉得 PHP 是全宇宙最好的语言,没有之一。
    

    算法主要包括:

    md2,md4,md5, sha1,sha224,sha256,sha384,sha512, ripemd128,ripemd160,ripemd256, snefru,snefru256, gost,gost-crypto, adler32, crc32,crc32b, fnv132,fnv1a32,fnv164,fnv1a64, joaat, haval128-3,haval160-3,haval192-3,haval224-3,haval256-3,haval128-4,haval160-4,haval192-4,haval224-4,haval256-4,haval128-5,haval160-5,haval192-5,haval224-5,haval256-5

    代码:https://github.com/hustcc/dig_hash

    Demo: http://dighash.com/

    下面是 github readme 文件:

    dig hash

    A hash algorithm set, write by PHP Slim framework. It an calculate the hash of any string. Also, we can see the length of hash code.

    hash algorithm include:

    md2,md4,md5,
    
     sha1,sha224,sha256,sha384,sha512,
    
     ripemd128,ripemd160,ripemd256,ripemd320,
    
     whirlpool,
    
     tiger128-3,tiger160-3,tiger192-3,tiger128-4,tiger160-4,tiger192-4,
    
     snefru,snefru256,
    
     gost,gost-crypto,
    
     adler32,
    
     crc32,crc32b,
    
     fnv132,fnv1a32,fnv164,fnv1a64,
    
     joaat,
    
     haval128-3,haval160-3,haval192-3,haval224-3,haval256-3,haval128-4,haval160-4,haval192-4,haval224-4,haval256-4,haval128-5,haval160-5,haval192-5,haval224-5,haval256-5
    

    For fun, I set one color for every hash algorithm, then we can call it the color of hash

    demo site

    Preview: http://dighash.com

    thanks to

    • Faker

    • php-file-cache

    use

    • git clone

    • cp code dir to nginx / apache 's work dir.

    other

    welcome to push request or give a issue. https://github.com/hustcc/dig_hash.

    2 条回复    2015-12-04 14:06:14 +08:00
    oott123
        1
    oott123  
       2015-12-04 13:31:46 +08:00
    好!
    可是这特码有什么用……
    50vip
        2
    50vip  
    OP
       2015-12-04 14:06:14 +08:00
    @oott123 没有特码卵用,哈哈~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2480 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:15 · PVG 22:15 · LAX 07:15 · JFK 10:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.