PHP Classes

File: src/Core/Curve25519/Ge/Precomp.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PHP Sodium Compat   src/Core/Curve25519/Ge/Precomp.php   Download  
File: src/Core/Curve25519/Ge/Precomp.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Sodium Compat
Cryptographic functions of libsodium in pure PHP
Author: By
Last change: Guard against duplicate class errors.
Date: 6 years ago
Size: 1,448 bytes
 

Contents

Class file image Download
<?php

if (class_exists('ParagonIE_Sodium_Core_Curve25519_Ge_Precomp', false)) {
    return;
}

/**
 * Class ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
 */
class ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
{
   
/**
     * @var ParagonIE_Sodium_Core_Curve25519_Fe
     */
   
public $yplusx;

   
/**
     * @var ParagonIE_Sodium_Core_Curve25519_Fe
     */
   
public $yminusx;

   
/**
     * @var ParagonIE_Sodium_Core_Curve25519_Fe
     */
   
public $xy2d;

   
/**
     * ParagonIE_Sodium_Core_Curve25519_Ge_Precomp constructor.
     *
     * @internal You should not use this directly from another application
     *
     * @param ParagonIE_Sodium_Core_Curve25519_Fe $yplusx
     * @param ParagonIE_Sodium_Core_Curve25519_Fe $yminusx
     * @param ParagonIE_Sodium_Core_Curve25519_Fe $xy2d
     */
   
public function __construct(
       
ParagonIE_Sodium_Core_Curve25519_Fe $yplusx = null,
       
ParagonIE_Sodium_Core_Curve25519_Fe $yminusx = null,
       
ParagonIE_Sodium_Core_Curve25519_Fe $xy2d = null
   
) {
        if (
$yplusx === null) {
           
$yplusx = new ParagonIE_Sodium_Core_Curve25519_Fe();
        }
       
$this->yplusx = $yplusx;
        if (
$yminusx === null) {
           
$yminusx = new ParagonIE_Sodium_Core_Curve25519_Fe();
        }
       
$this->yminusx = $yminusx;
        if (
$xy2d === null) {
           
$xy2d = new ParagonIE_Sodium_Core_Curve25519_Fe();
        }
       
$this->xy2d = $xy2d;
    }
}