PHP Classes

File: tests/polyfill_test.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   PHP Sodium Compat   tests/polyfill_test.php   Download  
File: tests/polyfill_test.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Sodium Compat
Cryptographic functions of libsodium in pure PHP
Author: By
Last change:
Date: 4 years ago
Size: 286 bytes
 

Contents

Class file image Download
<?php
require_once dirname(dirname(__FILE__)) . '/autoload.php';
$polyfill = str_replace('sodium_', '', $argv[1]);
if (!
method_exists('ParagonIE_Sodium_Compat', $polyfill)) {
    echo
$polyfill, ': NOT FOUND', PHP_EOL;
    exit(
1);
} else {
   
// echo $polyfill, ': FOUND', PHP_EOL;
}