sqlserver 对称加密
CREATE SYMMETRIC KEY ZXC WITH ALGORITHM = AES_256 ENCRYPTION BY PASSWORD = 'ZXC123456' --创建秘钥 OPEN SYMMETRIC KEY ZXC DECRYPTION BY PASSWORD = 'ZXC123456' --打开秘钥 SELECT CONVERT(VARCHAR(10), Decryptbykey(Encryptbykey(Key_guid('ZXC'), 'YHDH_C'))) --设置加密 CLOSE SYMMETRIC KEY ZXC; DROP SYMMETRIC KEY ZXC;