lil on Nostr: using var sha256 = SHA256.Create(); byte[] bytes = File.ReadAllBytes("zipのパス"); ...
using var sha256 = SHA256.Create();
byte[] bytes = File.ReadAllBytes("zipのパス");
var hash = string.Join("", sha256.ComputeHash(bytes).Select(x=>x.ToString("x2")).ToArray());でハッシュ値計算してるけど大丈夫よね……?
Published at
2024-09-11 09:04:21Event JSON
{
"id": "dd376e042431720b98f9a3e1630672ba33360e449c4f491382fd120a14335a59",
"pubkey": "0b3ea78d5fde7638d35e8d9b778e7cc17ad1ed8b37dd8ffff19d81a3edba8eea",
"created_at": 1726045461,
"kind": 1,
"tags": [
[
"proxy",
"https://misskey.niri.la/notes/9y177rgkoq",
"activitypub"
]
],
"content": "\n\nusing var sha256 = SHA256.Create();\nbyte[] bytes = File.ReadAllBytes(\"zipのパス\");\nvar hash = string.Join(\"\", sha256.ComputeHash(bytes).Select(x=\u003ex.ToString(\"x2\")).ToArray());でハッシュ値計算してるけど大丈夫よね……?",
"sig": "7fe74cff67dfd4d13e526001cb19a72b7d6f5b05f627540a44265723de0f788318c8d5b37a1f143c6646241fce724d72c10129352c583b1cd4d0f318de33dd99"
}