Hi everyone
I'm dealing with data in SQL that was encrypted in Ax 2012 using CryptoAPI. Now I'd like to know how to decrypt it inside of SQL, without the aid of Ax. my guess is that the way that I do this is by calling a Windows dll that uses the same algorithm that Ax uses.
My questions are:
- Is what I'm trying to do possible?
- What would the dll be that I would use and where would I find it within the operating system?
- What does the code look like in SQL? (having checked a website or 2, I've come to this. I need the ??? filled in. 'scuse the rough SQL)
CREATE ASSEMBLY ???
AUTHORIZATION dbo
FROM ???
WITH PERMISSION_SET = UNSAFE
GO
CREATE PROCEDURE decryptValue
@key BIGINT,
@pass BIGINT,
@ret NUMERIC
AS EXTERNAL NAME ???.decrypt
GO
DECLARE @key BIGINT,
DECLARE @pass BIGINT
EXEC DECRYPTvALUE 1111, 1111
PRINT Ret
Thanks