Topic: EncryptByPassPhrase and DecryptByPassphrase
There is data which shifrujutsja/will be decoded in a DB.
And this data from one DBMS is poured in other DBMS.
It is a question about MSSQL2012 and MSSQL2017
Faced a problem that the data which transited enciphering in MSSQL2012, cannot be deciphered in MSSQL2017 and on the contrary.
I so understand that algorithms in EncryptByPassPhrase and DecryptByPassphrase in MSSQL2017 changed.
Enciphering and decoding example:
DECLARE @PassphraseEnteredByUser NVARCHAR (512) = ' MN89HFG5HBRJOmKB '; DECLARE @Text NVARCHAR (512) = ' 12345-6788990' DECLARE @R NVARCHAR (512) SET @R = (SELECT CONVERT (NVARCHAR (4000), EncryptByPassPhrase (@PassphraseEnteredByUser, @Text, 1), 1)) DECLARE @InquiryBinary VARBINARY (900) SET @InquiryBinary = CONVERT (VARBINARY (900), @R, 1) SELECT CONVERT (NVARCHAR (1024), DecryptByPassphrase (@PassphraseEnteredByUser, @InquiryBinary, 1))
The most interesting, in MSSQL2005 2008 2012 is not present problems, I can cipher for example on 2012 and decrypt the data on 2008. And here with 2017 there was a problem...
Whether there are methods to adjust compatibility of enciphering with MSSQL2017?