Create cryptographically secure pseudo-random numbers, and manage big integers

Overview

laminas-math

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee. If you have a security issue, please follow our security reporting guidelines. If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

Build Status

Laminas\Math provides general mathematical functions. So far the supported functionalities are:

  • Laminas\Math\Rand, a random number generator;
  • Laminas\Math\BigInteger, a library to manage big integers.

Migration notes from v2 to v3

We document migration notes from v2 to v3, providing details of potential BC breaks and/or API differences you may need to be aware of.

Miscellany

Comments
  • 2.7: issue with latest RandomLib

    2.7: issue with latest RandomLib

    With RandomLib (and without mcrypt), running zend-form test suite:

    PHP Fatal error: Class Zend\Math\Source\HashTiming contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (RandomLib\Source::isSupported) in /usr/share/php/Zend/Math/Source/HashTiming.php on line 111


    Originally posted by @remicollet at https://github.com/zendframework/zend-math/issues/23

    opened by weierophinney 7
  • Fixed a missing `}` in `getInteger()` due to merge-up conflict resolution

    Fixed a missing `}` in `getInteger()` due to merge-up conflict resolution

    | Q | A |-------------- | ------ | Documentation |no | Bugfix | yes | BC Break | no | New Feature | no | RFC | no | QA | no

    Description

    There was a missing } in getInteger() and this Pull Request fixes this issue

    Bug 
    opened by japaveh 4
  • Added php8.1 support

    Added php8.1 support

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | no | BC Break | no | New Feature | no | RFC | no | QA | no

    Description

    Declared php 8.1 support https://github.com/magento/magento2/issues/34242

    Enhancement 
    opened by konarshankar07 3
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • composer.json (composer)
    • .github/workflows/auto-close.yml (github-actions)
    • .github/workflows/continuous-integration.yml (github-actions)
    • .github/workflows/docs-build.yml (github-actions)
    • .github/workflows/release-on-milestone-closed.yml (github-actions)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Enable Renovate Dependency Dashboard creation.
    • Ignore node_modules, bower_components, vendor and various test/tests directories.
    • Automerge patch and minor upgrades if they pass tests.
    • If automerging, push the new commit directly to the base branch (no PR).
    • Wait for branch tests to pass or fail before creating the PR.
    • Rebase existing PRs any time the base branch has been updated.
    • Separate major versions of dependencies into individual branches/PRs.
    • Do not separate patch and minor upgrades into separate PRs for the same dependency.
    • Raise PR when vulnerability alerts are detected.
    • Evaluate schedules according to timezone UTC.
    • Append Signed-off-by: to signoff Git commits.
    • Apply label renovate to PRs.
    • Group all minor and patch updates together.
    • Default configuration for repositories in the Laminas organisation

    🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 3 Pull Requests:

    Update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: 3.6.x
    • Upgrade actions/checkout to v3
    Update dependency laminas/laminas-coding-standard to v2
    Lock file maintenance
    • Schedule: ["before 2am"]
    • Branch name: renovate/lock-file-maintenance
    • Merge into: 3.6.x
    • Regenerate lock files to use latest dependency versions

    âť“ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    Read more information about the use of Renovate Bot within Laminas.

    renovate 
    opened by renovate[bot] 1
  • Access array offset directly without `list()`

    Access array offset directly without `list()`

    | Q | A |-------------- | ------ | Documentation | yes/no | Bugfix | yes/no | BC Break | yes/no | New Feature | yes/no | RFC | yes/no | QA | yes

    Description

    Current minimum PHP version 5.6 allows this syntax.

    Enhancement 
    opened by glensc 1
  • PHP 8.0 support

    PHP 8.0 support

    Feature Request

    | Q | A |------------ | ------ | New Feature | yes

    Summary

    To be prepared for the december release of PHP 8.0, this repository has some additional TODOs to be tested against the new major version.

    In order to make this repository compatible, one has to follow these steps:

    • [x] Modify composer.json to provide support for PHP 8.0 by adding the constraint ~8.0.0
    • [x] Modify composer.json to drop support for PHP less than 7.3
    • [x] Modify composer.json to implement phpunit 9.3 which supports PHP 7.3+
    • [x] Modify .travis.yml to ignore platform requirements when installing composer dependencies (simply add --ignore-platform-reqs to COMPOSER_ARGS env variable)
    • [x] Modify .travis.yml to add PHP 8.0 to the matrix (NOTE: Do not allow failures as PHP 8.0 has a feature freeze since 2020-08-04!)
    • [x] Modify source code in case there are incompatibilities with PHP 8.0
    Enhancement Help Wanted hacktoberfest-accepted 
    opened by boesing 1
  • Psalm integration

    Psalm integration

    Feature Request

    | Q | A |------------ | ------ | QA | yes

    Summary

    As decided during the Technical-Steering-Committee Meeting on August 3rd, 2020, Laminas wants to implement vimeo/psalm in all packages.

    Implementing psalm is quite easy.

    Required

    • [ ] Create a .psalm.xml.dist in the project root
    • [ ] Copy and paste the contents from this psalm.xml.dist
    • [ ] Run $ composer require vimeo/psalm
    • [ ] Run $ vendor/bin/psalm --set-baseline=psalm-baseline.xml
    • [ ] Add a composer script static-analysis with the command psalm --shepherd --stats
    • [ ] Add a new line to script: in .travis.yml: - if [[ $TEST_COVERAGE == 'true' ]]; then composer static-analysis ; fi
    • [ ] Remove phpstan from the project (phpstan.neon.dist, .travis.yml entry, composer.json require-dev and scripts)
    Optional
    • [ ] Fix as many psalm errors as possible.
    Enhancement Help Wanted hacktoberfest-accepted 
    opened by boesing 1
  • minor change - fix typo in migration.md

    minor change - fix typo in migration.md

    Signed-off-by: RDxR10 [email protected]

    | Q | A |-------------- | ------ | Documentation | yes | Bugfix | no | BC Break | no | New Feature | no | RFC | no | QA | no

    Description

    • Documentation (typo fix)
      • Target - 3.6.x
    Documentation Enhancement 
    opened by RDxR10 0
  • Drop `laminas/laminas-zendframework-bridge` and `zendframework/*` compatibility

    Drop `laminas/laminas-zendframework-bridge` and `zendframework/*` compatibility

    | Q | A |-------------- | ------ | Documentation | no | Bugfix | yes | BC Break | no | New Feature | no | RFC | no | QA | no

    Description

    Increase performance by removing a compatibility layer while not introducing breaking changes.

    This follow the process described in details in:

    https://github.com/laminas/technical-steering-committee/blob/main/meetings/minutes/2021-08-02-TSC-Minutes.md#remove-laminaslaminas-zendframework-bridge-dependency-from-our-packages

    Enhancement 
    opened by PowerKiKi 0
  • Merge release 3.3.2 into 3.4.x

    Merge release 3.3.2 into 3.4.x

    Release Notes for 3.3.2

    3.3.2

    • Total issues resolved: 0
    • Total pull requests resolved: 1
    • Total contributors: 1

    Enhancement

    opened by github-actions[bot] 0
  • Adopt Laminas CI workflow

    Adopt Laminas CI workflow

    • Remove .travis.yml
    • Add continuous-integration workflow
    • Remove CHANGELOG.md; changelogs will be written in milestone descriptions, and propagated to tags and release notes.
    • Fix linting errors
    Enhancement 
    opened by weierophinney 0
Releases(3.6.0)
Owner
Laminas Project
Laminas components and MVC.
Laminas Project
A library for generating random numbers and strings

RandomLib A library for generating random numbers and strings of various strengths. This library is useful in security contexts. Install Via Composer

Anthony Ferrara 832 Nov 24, 2022
Security issues for Magento have left a big question mark in the community of online stores

Magento 2 Security extension FREE. Security extension gives store owners the ability to detect the IP addresses that are intentionally attacking their store at any given time. Therefore, they have timely measures to prevent this issue such as blocking those IP addresses or sending warning emails to store owners.

Mageplaza 40 Apr 1, 2022
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Cossack Labs 1.6k Jan 6, 2023
ChestRandomBP: This plugin generates chests in random places within a specific world. Where you can customize what each one of them contains, the time and the world of spawning.

ChestRandomBP ChestRandomBP: This plugin generates chests, it works PocketMine-MP and random places within a specific world. Where you can customize w

null 5 Sep 19, 2021
Api random address

RandomAddress what actually it does? Its scrap Address from Fakeaddress and gives output in json format for api use. This address are working many pla

Nitin1818 6 Dec 28, 2022
A multitool library offering access to recommended security related libraries, standardised implementations of security defences, and secure implementations of commonly performed tasks.

SecurityMultiTool A multitool library offering access to recommended security related libraries, standardised implementations of security defences, an

Pádraic Brady 131 Oct 30, 2022
Quickly and easily secure HTML text.

Larasane Quickly sanitize text into safe-HTML using fluid methods. Requirements PHP 7.4, 8.0 or later. Laravel 7.x, 8.x or later. Installation Just fi

Italo 40 Jul 20, 2021
PHP Secure Communications Library

phpseclib - PHP Secure Communications Library Supporting phpseclib Become a backer or sponsor on Patreon One-time donation via PayPal or crypto-curren

null 4.9k Jan 7, 2023
PHP Secure Headers

Secure Headers Add security related headers to HTTP response. The package includes Service Providers for easy Laravel integration. Version Installatio

null 431 Dec 26, 2022
Secure API Toolkit

Sapient: Secure API toolkit Sapient secures your PHP applications' server-to-server HTTP(S) traffic even in the wake of a TLS security breakdown (comp

Paragon Initiative Enterprises 315 Jan 3, 2023
PHP Secure Configuration Checker

PHP Secure Configuration Checker Check current PHP configuration for potential security flaws. Simply access this file from your webserver or run on C

SektionEins GmbH 799 Nov 15, 2022
Automatic Encrypt and Decrypt your database data. Tested and used on Laravel 8

Laravel Encrypt Database Automatic Encrypt and Decrypt your database data. Tested and used on Laravel 8. I'm yet building the tests. Important Note th

Wellington Barbosa 2 Dec 15, 2021
Laravel Security was created by, and is maintained by Graham Campbell, and is a voku/anti-xss wrapper for Laravel, using graham-campbell/security-core

Laravel Security Laravel Security was created by, and is maintained by Graham Campbell, and is a voku/anti-xss wrapper for Laravel, using graham-campb

Graham Campbell 170 Nov 20, 2022
A cryptography API wrapping the Sodium library, providing a simple object interface for symmetrical and asymmetrical encryption, decryption, digital signing and message authentication.

PHP Encryption A cryptography API wrapping the Sodium library, providing a simple object interface for symmetrical and asymmetrical encryption, decryp

null 19 Dec 31, 2022
PHP 5.x support for random_bytes() and random_int()

random_compat PHP 5.x polyfill for random_bytes() and random_int() created and maintained by Paragon Initiative Enterprises. Although this library sho

Paragon Initiative Enterprises 8k Jan 5, 2023
PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

PHPIDS PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web ap

null 752 Jan 3, 2023
Fast, general Elliptic Curve Cryptography library. Supports curves used in Bitcoin, Ethereum and other cryptocurrencies (secp256k1, ed25519, ..)

Fast Elliptic Curve Cryptography in PHP Information This library is a PHP port of elliptic, a great JavaScript ECC library. Supported curve types: Sho

Simplito 178 Dec 28, 2022
TCrypto is a simple and flexible PHP 5.3+ in-memory key-value storage library

About TCrypto is a simple and flexible PHP 5.3+ in-memory key-value storage library. By default, a cookie will be used as a storage backend. TCrypto h

timoh 57 Dec 2, 2022
Automatic SQL injection and database takeover tool

sqlmap sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of

sqlmapproject 25.7k Jan 5, 2023