Sha256: cc81bc65203579891d0650346710a8fa5eacd6af7866d2daae7882cc9e3e0e60

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true

require "ob64"
require "base64"

module Ob64
  module CoreExt
    def strict_encode64(bin)
      Ob64.strictier_encode(bin)
    end

    def strict_decode64(str)
      Ob64.strictier_decode(str)
    end

    def urlsafe_encode64(bin, padding: true)
      Ob64.urlsafe_encode(bin, padding: padding)
    end

    def urlsafe_decode64(str)
      Ob64.urlsafe_decode(str)
    end
  end

  ::Base64.prepend(CoreExt)
  ::Base64.singleton_class.prepend(CoreExt)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ob64-0.2.0 lib/ob64/core_ext.rb
ob64-0.1.0 lib/ob64/core_ext.rb