承接 lyoshenka/php-hmac 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lyoshenka/php-hmac

Composer 安装命令:

composer require lyoshenka/php-hmac

包简介

A generic HMAC function that can be used with any hash

关键字:

README 文档

README

A generic HMAC function that can be used with any hash

Install

composer install lyoshenka/php-hmac

Use

<?php
require __DIR__.'/vendor/autoload.php';

# Ensure that your hash functions returns raw output (not hex)
$sha256Fn = function($message) { return hash('sha256', $message, true); };

# Look up the block size - https://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions
$blockSize = 64; // make sure this in bytes, not bits

# Compute the HMAC digest
$digest = \lyoshenka\hmac("The message text goes here", "secret-key", $sha256Fn, $blockSize);

# Output the digest as a hex string
echo bin2hex($digest) . "\n";

Examples

See examples.php

References

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固