暗号関連 カウンターモード パディングが不要 AES-256-GCMのIVの長さ 12バイトらしい。 カウンターの4バイトは含めない模様。 irb(main):001:0> require 'openssl' => true irb(main):002:0> cipher = OpenSSL::Cipher.new("AES-256-GCM") => #<OpenSSL::Cipher:0x00007fddb10d4198> irb(main):003:0> cipher.iv_len => 12 irb(main):004:0>