CoreFiles by mySites.guru
SignatureConverter.php38 lines, 969 bytes, from Joomla_4.4.2-Stable-Full_Package.zip
Raw History Compare with 4.4.1
md5
7ffecfd3b10be84729a88a6ee42153bc
sha1
7f79231e440453f54b0c1c798ad3dbcc0c852f37
sha256
610baaaff5dbb9af22441180ff9dedc298f331c5fd58af3742b96059c75f01d4
<?php
namespace Lcobucci\JWT\Signer\Ecdsa;

/**
 * Manipulates the result of a ECDSA signature (points R and S) according to the
 * JWA specs.
 *
 * OpenSSL creates a signature using the ASN.1 format and, according the JWA specs,
 * the signature for JWTs must be the concatenated values of points R and S (in
 * big-endian octet order).
 *
 * @internal
 *
 * @see https://tools.ietf.org/html/rfc7518#page-9
 * @see https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One
 */
interface SignatureConverter
{
    /**
     * Converts the signature generated by OpenSSL into what JWA defines
     *
     * @param string $signature
     * @param int $length
     *
     * @return string
     */
    public function fromAsn1($signature, $length);

    /**
     * Converts the JWA signature into something OpenSSL understands
     *
     * @param string $points
     * @param int $length
     *
     * @return string
     */
    public function toAsn1($points, $length);
}

The same content is in 75 releases, Joomla 4.2.0-beta3 to 4.4.14. See them all, or every version of this file.