src/Security/Member.php
public function encryptWithUserSettings($string)
    {
        if (!$string) {
            return null;
        }

        // If the algorithm or salt is not available, it means we are operating
        // on legacy account with unhashed password. Do not hash the string.
        if (!$this->PasswordEncryption) {
            return $string;
        }

        // We assume we have PasswordEncryption and Salt available here.
        $e = PasswordEncryptor::create_for_algorithm($this->PasswordEncryption);

        return $e->encrypt($string, $this->Salt);
    }
public function encryptWithUserSettings($string)
    {
        if (!$string) {
            return null;
        }

        // If the algorithm or salt is not available, it means we are operating
        // on legacy account with unhashed password. Do not hash the string.
        if (!$this->PasswordEncryption) {
            return $string;
        }

        // We assume we have PasswordEncryption and Salt available here.
        $e = PasswordEncryptor::create_for_algorithm($this->PasswordEncryption);

        return $e->encrypt($string, $this->Salt);
    }
public function encryptWithUserSettings ( $ string ) { if ( ! $ string ) { return null ; } // If the algorithm or salt is not available, it means we are operating // on legacy account with unhashed password. Do not hash the string. if ( ! $ this -> PasswordEncryption ) { return $ string ; } // We assume we have PasswordEncryption and Salt available here. $ e = PasswordEncryptor :: create_for_algorithm ( $ this -> PasswordEncryption ) ; return $ e -> encrypt ( $ string , $ this -> Salt ) ; }
Utility for generating secure password hashes for this member.

@param string $string
@return string
@throws PasswordEncryptor_NotFoundException
Utility for generating secure password hashes for this member .