USP_SECUREGATEWAY_CREDENTIALS_GET

Definition

Copy


            create procedure dbo.USP_SECUREGATEWAY_CREDENTIALS_GET
            as
            begin
                -- Get the credential for the given name

                -- Credential name is unique

                set nocount on;

                exec dbo.USP_GET_KEY_ACCESS;
                begin try
                    select
                        [NAME],
                        cast(DecryptByKey([ACCESSKEY]) as nvarchar(200)) AS [ACCESSKEY]
                    from
                        dbo.[SECUREGATEWAYCREDENTIALS];

                close symmetric key sym_BBInfinity;
                end try
                begin catch
                    exec dbo.USP_RAISE_ERROR;
                    close symmetric key sym_BBInfinity;
                    return 1;
                end catch

                return 0;
            end