hashing passwords in yii 1 code example Example: hashing passwords in yii 1 $hash = Yii::$app->getSecurity()->generatePasswordHash($password);