定制 nechin/smart-hash 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nechin/smart-hash

Composer 安装命令:

composer require nechin/smart-hash

包简介

A simple hash generator that makes it easy to get a hash for any text.

README 文档

README

Source Code Latest Version Software License Total Downloads

About

A simple hash generator that makes it easy to get a hash for any text.

From Wikipedia:

A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. The values are used to index a fixed-size table called a hash table. Use of a hash function to index a hash table is called hashing or scatter storage addressing.

Installation

The preferred method of installation is via Packagist and Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require nechin/smart-hash

Requirements

PHP 5.4.0

Examples

If no length is specified, the ripemd128 algorithm is used, which will generate a string of 32 hexadecimal digits.

The following hash lengths are available: 8, 16, 32, 40, 48, 56, 64, 80, 96, 128. For each length is used its own optimal algorithm.

It is possible to specify the desired algorithm as the third parameter. Then the second parameter should be false.

<?php
use Nechin\SmartHash\SmartHash;

SmartHash::hash('Hello World');  // 2d02b563447f954eafdc4824a190ddcc
SmartHash::hash('Hello World', 64);  // 32b7b7d2408f9389d77cc00aff3c1529504508e86cdbc78a95c469fc68f80543
SmartHash::hash('Hello World', false, 'sha384'); // 99514329186b2f6ae4a1329e7ee6c610a729636335174ac6b740f9028396fcc803d0e93863a7c3d90f86beee782f4f3f

Copyright and license

The nechin/smart-hash library is copyright © Alexander Vitkalov and licensed for use under the MIT License (MIT). Please see LICENSE for more information.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固