Crypt::encrypt PHP Method

encrypt() public static method

Encrypt the given value.
public static encrypt ( string $value ) : string
$value string
return string
        public static function encrypt($value)
        {
            return \Illuminate\Encryption\Encrypter::encrypt($value);
        }

Usage Example

 /**
  * Tests Crypt->decrypt()
  */
 public function testDecrypt()
 {
     // Encrypt the data
     $encrypted = $this->crypt->encrypt(self::DATA);
     // Decrypt the data
     $decrypted = $this->crypt->decrypt($encrypted);
     $this->assertTrue($decrypted == self::DATA, 'Testing data decryption');
     unset($encrypted, $decrypted);
 }
All Usage Examples Of Crypt::encrypt