<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toshifusa1423</author_name>
  <author_url>https://blog.hatena.ne.jp/toshifusa1423/</author_url>
  <blog_title>toshifusaの日記</blog_title>
  <blog_url>https://toshifusa1423.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>チェックサム計算がなにげに面倒くさかったです。 きっと組み込みな人々は、もっとよい方法を知っているのであろう・・・。 環境 Ruby 1.8.7 参考にしたページ class Array (Ruby 1.8.7) class String (Ruby 1.8.7) sprintf フォーマット (Ruby 1.8.7) チェックサム計算 この例では、1バイト単位の16進数配列をチェックサム計算し、その配列にチェックサムを追加しています。 array = [&quot;05&quot;, &quot;0A&quot;, &quot;0F&quot;] =&gt; [&quot;05&quot;, &quot;0A&quot;, &quot;0F&quot;] sum = &quot;%02X&quot; % array.inject(0)…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoshifusa1423.hatenadiary.org%2Fentry%2F20101028%2F1288248316&quot; title=&quot;チェックサム計算 - toshifusaの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-10-28 15:45:16</published>
  <title>チェックサム計算</title>
  <type>rich</type>
  <url>https://toshifusa1423.hatenadiary.org/entry/20101028/1288248316</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
