<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chiroito</author_name>
  <author_url>https://blog.hatena.ne.jp/chiroito/</author_url>
  <blog_title>#chiroito ’s blog</blog_title>
  <blog_url>https://chiroito.hatenablog.jp/</blog_url>
  <categories>
    <anon>Java</anon>
  </categories>
  <description>Java で32桁の16進数の乱数を簡単に作りたいなと思ったので作ってみたメモ。 byte[] bytes = new byte[16]; SecureRandom random = new SecureRandom(); random.nextBytes(bytes); String hexString = HexFormat.of().formatHex(bytes); これで変数 hexString には 7ffda83291c2b5e47db3557138ef7799 のような文字列が入ります。 16進数の 1 桁は 4 bit で、byte は 8 bitです。なので、欲しい桁の半分…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchiroito.hatenablog.jp%2Fentry%2F2024%2F01%2F18%2F102133&quot; title=&quot;Javaで16進数の乱数を生成 - #chiroito ’s blog&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>2024-01-18 10:21:33</published>
  <title>Javaで16進数の乱数を生成</title>
  <type>rich</type>
  <url>https://chiroito.hatenablog.jp/entry/2024/01/18/102133</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
