string CalculateHMACSHA256(byte[] bytes) { using (var hmacsha256 = new HMACSHA256(key)) { var bs = hmacsha256.ComputeHash(bytes); return BitConverter.ToString(bs).ToLower().Replace("-", ""); } } // 出力例 // b248bb2b861e5efe1e5bea3722b19c65ec73f77a64deaf76906cc513f40db534