Sha256: a21053cc991b52789a7ea83d06c370f3ef9c3be0deea93aa85611a0be859bb6e

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module Paseto
  module ASN1
    class ECDSAFullR < T::Struct
      extend T::Sig

      const :r, OpenSSL::PKey::EC::Point
      const :s, OpenSSL::BN

      sig { returns(OpenSSL::ASN1::Sequence) }
      def build
        # Unsupported by OpenSSL 3.0
        # :nocov:
        OpenSSL::ASN1::Sequence.new(
          [
            OpenSSL::ASN1::OctetString.new(r.to_octet_string(:compressed)),
            OpenSSL::ASN1::Integer.new(s)
          ]
        )
        # :nocov:
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-paseto-0.1.2 lib/paseto/asn1/ecdsa_full_r.rb
ruby-paseto-0.1.1 lib/paseto/asn1/ecdsa_full_r.rb
ruby-paseto-0.1.0 lib/paseto/asn1/ecdsa_full_r.rb