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

演算法圖鑑

演算法圖鑑

石田保輝、宮崎修一 / 陳彩華 / 臉譜 / 2017-12 / TWD450

★日本超人氣演算法學習書 ★逾50萬次下載量,「Apple年度最佳APP」書籍化! ★隨書附贈獨家贈品「圖形搜尋和排序圖解記憶表」 ★★ 讀再多文字解說都看不懂?沒關係,全部畫給你看,一次弄懂演算法到底是什麼!★★ ●直觀理解,從基礎開始學習,一用就上手的演算法專書! ●全圖像化step by step,完整拆解制霸AI時代的演算法精髓! ●詳解演算法的奧妙、執......一起来看看 《演算法圖鑑》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具