Class: Sandal::Sig::ES384

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

Overview

The ECDSA-SHA384 signing algorithm.

Constant Summary collapse

NAME =

The JWA name of the algorithm.

"ES384"
CURVE_NAME =

The ECDSA curve name.

"secp384r1"

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, #sign, #valid?

Constructor Details

#initialize(key) ⇒ ES384

Creates a new instance.

Parameters:

  • key (OpenSSL::PKey::EC or String)

    The key to use for signing (private) or validation (public). If the value is a String then it will be passed to the constructor of the EC class.

Raises:

  • (ArgumentError)

    The key is not in the “secp384r1” group.



143
144
145
# File 'lib/sandal/sig/es.rb', line 143

def initialize(key)
  super(NAME, 384, 384, make_key(key, CURVE_NAME))
end