Created
January 17, 2019 16:35
-
-
Save mikerodionov/eee617f573655f64a60bc274d9b82a10 to your computer and use it in GitHub Desktop.
SQL Encryption Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE K2 | |
OPEN SYMMETRIC KEY [SCSSOKey] | |
DECRYPTION BY CERTIFICATE SCHostServerCert; | |
GO | |
DECLARE @ED varbinary(max) | |
SELECT @ED=encryptbykey(key_guid('SCSSOKey'), 'WeAreEncryptingThisText' ) | |
PRINT @ED | |
SELECT @ED | |
SELECT CONVERT(VARCHAR, DecryptByKey(@ED)) | |
GO | |
CLOSE SYMMETRIC KEY [SCSSOKey]; | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment