Various utility methods.
@private
Base64-encodes the given data. Newlines are removed. This is like `Base64.strict_encode64`, but also works on Ruby 1.8 which doesn‘t have that method.
Workaround for approximating the monotonic clock
[Validate]