create procedure sys.sp_MSsafe_repl_encrypt (@password nvarchar(524) output)
as
begin
declare @retcode int
begin try
EXEC @retcode = sys.xp_repl_encrypt @password OUTPUT
IF @@ERROR <> 0 OR @retcode <> 0
return 1
end try
begin catch
select @password = ''
if (ERROR_NUMBER() = 17750) --Could not find xprepl.dll - mask this error
begin
return 0
end
else
begin
return 1 -- All other errors are not masked
end
end catch
return 0
end