Funciones criptográficas (Transact-SQL)Cryptographic functions (Transact-SQL)

SE APLICA A: síSQL Server (a partir de 2008) síAzure SQL Database noAzure SQL Data Warehouse noAlmacenamiento de datos paralelos APPLIES TO: yesSQL Server (starting with 2008) yesAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

Estas funciones admiten la firma digital, la validación de firma digital, el cifrado y el descifrado.These functions support digital signing, digital signature validation, encryption, and decryption.

Cifrado y descifrado simétricosSymmetric encryption and decryption

ENCRYPTBYKEYENCRYPTBYKEY DECRYPTBYKEYDECRYPTBYKEY
ENCRYPTBYPASSPHRASEENCRYPTBYPASSPHRASE DECRYPTBYPASSPHRASEDECRYPTBYPASSPHRASE
KEY_IDKEY_ID KEY_GUIDKEY_GUID
DECRYPTBYKEYAUTOASYMKEYDECRYPTBYKEYAUTOASYMKEY KEY_NAMEKEY_NAME
SYMKEYPROPERTYSYMKEYPROPERTY

Cifrado y descifrado asimétricosAsymmetric encryption and decryption

ENCRYPTBYASYMKEYENCRYPTBYASYMKEY DECRYPTBYASYMKEYDECRYPTBYASYMKEY
ENCRYPTBYCERTENCRYPTBYCERT DECRYPTBYCERTDECRYPTBYCERT
ASYMKEYPROPERTYASYMKEYPROPERTY ASYMKEY_IDASYMKEY_ID

Firma y comprobación de firmaSigning and signature verification

SIGNBYASYMKEYSIGNBYASYMKEY VERIFYSIGNEDBYASMKEYVERIFYSIGNEDBYASMKEY
SIGNBYCERTSIGNBYCERT VERIGYSIGNEDBYCERTVERIGYSIGNEDBYCERT
IS_OBJECTSIGNEDIS_OBJECTSIGNED

Descifrado simétrico con control de clave automáticoSymmetric decryption, with automatic key handling

DecryptByKeyAutoCertDecryptByKeyAutoCert

Hash de cifradoEncryption hashing

HASHBYTESHASHBYTES

Copia de certificadosCertificate copying

CERTENCODED (Transact-SQL)CERTENCODED (Transact-SQL)
CERTPRIVATEKEY (Transact-SQL)CERTPRIVATEKEY (Transact-SQL)

Vea tambiénSee also

FuncionesFunctions
Jerarquía de cifradoEncryption Hierarchy
Jerarquía de permisos (motor de base de datos)Permissions Hierarchy (Database Engine)
CREATE CERTIFICATE (Transact-SQL)CREATE CERTIFICATE (Transact-SQL)
CREATE SYMMETRIC KEY (Transact-SQL)CREATE SYMMETRIC KEY (Transact-SQL)
CREATE ASYMMETRIC KEY (Transact-SQL)CREATE ASYMMETRIC KEY (Transact-SQL)
Vistas de catálogo de seguridad (Transact-SQL)Security Catalog Views (Transact-SQL)