logo
  • 教程列表
  • SO官方文档
  • 加密
    • 按证书加密
    • 数据库加密
    • 通过对称密钥加密
    • 通过密码加密
  1. StackOverflow 文档
  2. Microsoft SQL Server 教程
  3. 加密
  4. 通过对称密钥加密

通过对称密钥加密

Created: November-22, 2018

-- Create the key and protect it with the cert
CREATE SYMMETRIC KEY My_Sym_Key
WITH ALGORITHM = AES_256  
ENCRYPTION BY CERTIFICATE My_New_Cert;
GO

-- open the key
OPEN SYMMETRIC KEY My_Sym_Key
DECRYPTION BY CERTIFICATE My_New_Cert;

-- Encrypt
SELECT EncryptByKey(Key_GUID('SSN_Key_01'), 'This text will get encrypted');
  • 通过密码加密
  • 数据库加密

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明