[問題] 請問這樣的SHA246加密對嗎?
不曉得大家是否用過一個asp論壇,叫做 SnitzForum的
它的密碼是使用SHA256加密,用VBScript寫的!
因此我去找相關的資料,在.net發現這樣的寫法:
System.Security.Cryptography.SHA256 hash = System.Security.Cryptography.SHA256.Create();
string s = "123456"; // plain-text
byte[] plainTextBytes = System.Text.Encoding.UTF8.GetBytes(s);
byte[] hashBytes = hash.ComputeHash(plainTextBytes);
string hashString = Convert.ToBase64String(hashBytes);
Console.WriteLine(hashString);
不過產生出來的字串跟它不同!
我不知道到底是誰對,因此要問大家的想法!?
ps.其vbscript的又臭又長,貼上來也沒用!
不曉得有公正的程式可驗證我所產生的加密文是否符合sha246編碼?
--
You're recommended to vist C_Sharp in PTT.
We are the C#, resistance is futile.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.119.183.211
討論串 (同標題文章)
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章