nostriphant/nip-44
最新稳定版本:2.0.3
Composer 安装命令:
composer require nostriphant/nip-44
包简介
Nostr NIP-44 implementation in PHP
README 文档
README
Nostr NIP-44 implementation in PHP
Usage
use nostriphant\NIP01\Key;
use nostriphant\NIP44\Encrypt;
use nostriphant\NIP44\Decrypt;
$recipient_key = Key::fromHex('4b22aa260e4acb7021e32f38a6cdf4b673c6a277755bfce287e370c924dc936d');
$recipient_pubkey = $recipient_key(Key::public());
$sender_key = Key::fromHex('5c0c523f52a5b6fad39ed2403092df8cebc36318b39383bca6c00808626fab3a');
$sender_pubkey = $sender_key(Key::public());
$payload = Encrypt::make($sender_key, $recipient_pubkey)('Hello World!');
assert('Hello World!' === Decrypt::make($recipient_key, $sender_pubkey)($payload));
统计信息
- 总下载量: 933
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-20