摘要:
1 CREATE SYMMETRIC KEY key1 WITH ALGORITHM=DES 2 ENCRYPTION BY PASSWORD='abc$123' 3 GO 4 5 OPEN SYMMETRIC KEY key1 6 DECRYPTION BY PASSWORD='abc$123' 7 8 DECLARE @str NVARCHAR(100),@Encrypted VARBINARY(MAX) 9 SET @str=N'要加密的字串' 10 SELECT @Encrypted=ENCRYPTBYKEY(KEY_GUID(' 阅读全文