File: src/CryptographyKeys/SigningPublicKey.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  sapient  >  src/CryptographyKeys/SigningPublicKey.php  >  Download  
File: src/CryptographyKeys/SigningPublicKey.php
Role: Class source
Content type: text/plain
Description: Class source
Class: sapient
Add a security layer to server to server requests
Author: By
Last change:
Date: 3 years ago
Size: 602 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);
namespace
ParagonIE\Sapient\CryptographyKeys;

use
ParagonIE\Sapient\CryptographyKey;

/**
 * Class SigningPublicKey
 * @package ParagonIE\Sapient
 */
class SigningPublicKey extends CryptographyKey
{
   
/**
     * SigningPublicKey constructor.
     * @param string $key
     * @throws \RangeException
     */
   
public function __construct(string $key)
    {
        if (\
ParagonIE_Sodium_Core_Util::strlen($key) !== SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES) {
            throw new \
RangeException('Key is not the correct size');
        }
       
$this->key = $key;
    }
}


For more information send a message to info at phpclasses dot org.