Swift 字符串加密 SweetHMAC

码农软件 · 软件分类 · 加密/解密软件包 · 2019-09-30 18:41:55

软件介绍

SweetHMAC 是个极小,简单易用的 Swift 类,使用 HMAC 算法加密字符串。

字符串扩展:

// Will output this string: e470f785afb708cd8c2a31860642fd11
"I'm going to make him an offer he can't refuse".HMAC(.MD5, secret:"Vito Corleone")

HMAC:

let quote = "I'm going to make him an offer he can't refuse"
let author = "Vito Corleone"
// Create a SweetHMAC instance with your message and secret strings
let hmacEncrypt:SweetHMAC = SweetHMAC(source: quote, secret: author)
// Pick some computed HMAC output based on some algorithm using "HMAC" method...
let md5 = hmacEncrypt.HMAC(.MD5)
// ...or do it more "Sweet" like this
let md5 = SweetHMAC(source: quote, secret: author).HMAC(.MD5)


本文地址:https://codercto.com/soft/d/15751.html

伏牛传

伏牛传

张天一 / 机械工业出版社 / 2016-5 / 39.00元

编辑推荐: 伏牛堂创始人张天一独家揭秘 社群品牌运营背后的规律和逻辑 90后创业者张天一白手起家,在伏牛堂创立一年之际,已是京城大众点评口碑最佳湖南牛肉粉店、获得四轮数千万投资,他是如何做到的? 餐饮品牌伏牛堂如何建设20万人的青年人生活社群 “霸蛮社”,并快速成为知名品牌? 内容推荐: 《伏牛传:一个社群品牌的内部运营笔记》是一本餐饮社群品牌的内部运营笔记,90后创......一起来看看 《伏牛传》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具