# Protector Helper

  • Class with Namespace: \FluentForm\App\Helpers\Protector
  • Method Types: static

# Protector::getSalt()

The Protector::getSalt method returns Fluent Forms encryption and decryption security salt.

    use FluentForm\App\Helpers\Protector;

    $ffSecuritySalt = Protector::getSalt();

    // security slot
1
2
3
4
5

# Protector::encrypt()

The Protector::encrypt method convert normal text to encryption text using a predefined salt and return encrypted text.

    use FluentForm\App\Helpers\Protector;

    $encryptedText = Protector::encrypt('sample text');

    // xfQuSDtj2ywFsN+alzijiAtT9oJwSjoPiqVLSA80pN73U630bsRbf/mGM7haaNWazIawwDV6Kp04BBWJlyb/oA==
1
2
3
4
5

# Protector::decrypt()

The Protector::decrypt method convert encrypted text to normal text using a predefined salt and return decrypted text.

    use FluentForm\App\Helpers\Protector;

    $decryptedText = Protector::decrypt('xfQuSDtj2ywFsN+alzijiAtT9oJwSjoPiqVLSA80pN73U630bsRbf/mGM7haaNWazIawwDV6Kp04BBWJlyb/oA==');

    // sample text
1
2
3
4
5