public function getHashWithMetadata(string $oldHash, EncryptionKey $passwordKey = null) : array
{
if (!$passwordKey) {
if (!$this->key instanceof EncryptionKey) {
throw new \Exception(\__('No key was passed to this migration'));
}
$passwordKey = $this->key;
}
return [new HiddenString(Password::hash($oldHash, $passwordKey)), ['type' => self::TYPE, 'salt' => Binary::safeSubstr($oldHash, 0, 12)]];
}