def self.decode(data, mode: nil)
          case mode
          when :strict   then ::Base64.strict_decode64(data)
          when :url_safe then ::Base64.urlsafe_decode64(data)
          when nil       then ::Base64.decode64(data)