Sha256: 688ed8bf1fa0c7b0c401249f9aa154738bbc5de23e004a7190ebc6b964460219
Contents?: true
Size: 527 Bytes
Versions: 3
Compression:
Stored size: 527 Bytes
Contents
# typed: strict # frozen_string_literal: true module Paseto module Interface module ID extend T::Sig extend T::Helpers abstract! sig(:final) { params(type: String, paserk: String).returns(String) } def encode(type, paserk) header = "#{protocol.paserk_version}.#{type}." d = protocol.digest("#{header}#{paserk}", digest_size: 33) "#{header}#{Util.encode64(d)}" end sig { abstract.returns(Interface::Version) } def protocol; end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-paseto-0.1.2 | lib/paseto/interface/i_d.rb |
ruby-paseto-0.1.1 | lib/paseto/interface/i_d.rb |
ruby-paseto-0.1.0 | lib/paseto/interface/i_d.rb |