src/Leevel/Encryption/Encryption.php
public function encrypt(string $value, int $expiry = 0): string
    {
        $iv = $this->createIv();

        $value = $this->packData($value, $expiry, $iv);

        return $this->encryptData($value, $iv);
    }
public function encrypt(string $value, int $expiry = 0): string
    {
        $iv = $this->createIv();

        $value = $this->packData($value, $expiry, $iv);

        return $this->encryptData($value, $iv);
    }
加密.

@param string $value
@param int    $expiry

@return string