CryptoKit 0.4.0

CryptoKit 0.4.0

测试已测试
lang语言 SwiftSwift
许可证 MIT
发布日期最新发布2017年12月
SwiftSwift 版本4.0
SPM支持 SPM

Chris Amanse 维护。



CryptoKit 0.4.0

CryptoKit🔑

一个包含加密函数实现的长威框架。

功能

哈希算法

  • [x] MD5
  • [x] SHA-1
  • [x] SHA-224
  • [x] SHA-256
  • [x] SHA-384
  • [x] SHA-512

HMAC (基于哈希的消息认证码)

  • [x] HMAC (使用任何已实现的哈希函数)

使用

立即在 IBM Swift 沙盒 中尝试 CryptoKit API。

哈希 / 摘要

let message = "The quick brown fox jumps over the lazy dog".data(using: .utf8)!

let hash = message.digest(using: .sha256) // Supports MD5, SHA-1 and SHA-2 variants

HMAC

let hmac = HMAC(key: secret, message: message, hashFunction: .sha1)

许可证

版权 © 2016 Joe Christopher Paul Amanse

此软件遵循 MIT 许可证