Giter Site home page Giter Site logo

globaltradingtechnologies / crypt-bundle Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 4.0 80 KB

Provides symfony encryptor/decryptor services based on various cryptographic components

License: MIT License

PHP 100.00%
symfony-bundle encryptor decryptor bundle security encryption aes rsa

crypt-bundle's People

Contributors

berezuev avatar edefimov avatar fduch avatar lisachenko avatar timurib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

crypt-bundle's Issues

Encrypted string with aes_binary_cryptor doesn't match with previous encrypted string

Problem

Encrypted string with aes_binary_cryptor never matches with the same string previously encrypted with the same encryptor.

Current configuration

gtt_crypt:
    cryptors:
        aes:
            aes_binary_cryptor:
                key_size: 256
                key_path: "%kernel.project_dir%/config/aes/first.key"
                binary_output: true
    doctrine:
        dbal:
            encrypted_string: aes_binary_cryptor

How to simulate the problem

$string1 = $this->crypt->encrypt('abc');
$string2 = $this->crypt->encrypt('abc');

// $string1 never matches with $string2!

How I'm applying it in a repository method

$qb = $this->createQueryBuilder('q');
$qb->andWhere('q.name = :name');
$qb->setParameter('name', $name, TypeEnum::ENCRYPTED_STRING);

$query = $qb->getQuery();
return $query->execute();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.