Class: Sandal::Sig::ES384

Inherits:
ES
  • Object
show all
Defined in:
lib/sandal/sig/es.rb

Overview

The ECDSA-SHA384 signing algorithm.

Instance Attribute Summary

Attributes inherited from ES

#name

Instance Method Summary collapse

Methods inherited from ES

decode_asn1_signature, decode_jws_signature, encode_asn1_signature, encode_jws_signature, #ensure_curve, #sign, #valid?

Constructor Details

#initialize(key) ⇒ ES384

Creates a new instance.

Parameters:

  • key (OpenSSL::PKey::EC)

    The key to use for signing (private) or validation (public).

Raises:

  • (ArgumentError)

    The key is not in the “secp384r1” group.



122
123
124
125
# File 'lib/sandal/sig/es.rb', line 122

def initialize(key)
  ensure_curve(key, 'secp384r1')
  super(384, 384, key)
end