1 # frozen_string_literal: true
2 require_relative "utils"
6 class OpenSSL::TestRandom < OpenSSL::TestCase
8 assert_equal("", OpenSSL::Random.random_bytes(0))
9 assert_equal(12, OpenSSL::Random.random_bytes(12).bytesize)
13 # deprecated as of OpenSSL 1.1.0
14 assert_equal("", OpenSSL::Random.pseudo_bytes(0))
15 assert_equal(12, OpenSSL::Random.pseudo_bytes(12).bytesize)
16 end if OpenSSL::Random.methods.include?(:pseudo_bytes)