module RbNaCl::Util
def zeros(n = 32)
-
(String)
- A nice collection of zeros
Parameters:
-
n
(Integer
) -- the size of the string to make
def zeros(n = 32) zeros = "\0" * n # make sure they're 8-bit zeros, not 7-bit zeros. Otherwise we might get # encoding errors later zeros.respond_to?(:force_encoding) ? zeros.force_encoding("ASCII-8BIT") : zeros end