最近在處理一些事情,需要前端用到 SHA512 驗證東西,這時候我 Server 端也要驗證,所以就網路上找一下可以讓 Server 跟前端可以對起來的 SHA512 方法,因為試了一些
想說就記錄一下
Javascript 端:
主要是透過 https://github.com/emn178/js-sha512 這邊的 js lib 來做到
Source code :
C# Code :
這樣我對於字串 "許當麻麻麻" 做雜湊之後都是 "aa79f7b9e3ba67f495a740def4e2d883a83200f6448a1ab602c497152111c9dd4e4d734a93917d201af2d1be1d691792d12460bf7769dd3e19bbb4252b5add47"
紀錄一下怕之後要用到又要重新測試
reference :
https://github.com/emn178/js-sha512
https://dotblogs.com.tw/mrsunboss/2013/04/07/99955#SHA512
--
Before you read this, the article was in a superposition of human and AI. Upon observation, the wave function collapsed into a sleep-deprived developer.
如果這篇文章有幫助到您幫我分享一下,讓我有寫下去的動力...