Skip to content
instance method

OpenSSL::Digest#block_length

() -> ::Integer
digest.block_length → integer

Returns the block length of the digest algorithm, i.e. the length in bytes of an individual block. Most modern algorithms partition a message to be digested into a sequence of fix-sized blocks that are processed consecutively.

Example

Example
digest = OpenSSL::Digest.new('SHA1')
puts digest.block_length # => 64
See also #<< #digest_length .new #finish also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0