Skip to content

Latest commit

 

History

History
87 lines (71 loc) · 3.86 KB

cryptographic-functions-transact-sql.md

File metadata and controls

87 lines (71 loc) · 3.86 KB
title ms.custom ms.date ms.prod ms.prod_service ms.component ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Cryptographic Functions (Transact-SQL) | Microsoft Docs
07/24/2017
sql
database-engine, sql-database
t-sql|functions
sql
t-sql
language-reference
TSQL
functions [SQL Server], cryptographic
crypto functions
cryptography [SQL Server], functions
decryption [SQL Server], functions
security functions
encryption [SQL Server], functions
0be5626b-5a25-4d8c-9f44-7abbfccf816c
16
edmacauley
edmaca
craigg

Cryptographic functions (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx-md]

The following functions support encryption, decryption, digital signing, and the validation of digital signatures.

Symmetric encryption and decryption

ENCRYPTBYKEY DECRYPTBYKEY
ENCRYPTBYPASSPHRASE DECRYPTBYPASSPHRASE
KEY_ID KEY_GUID
DECRYPTBYKEYAUTOASYMKEY KEY_NAME
SYMKEYPROPERTY

Asymmetric encryption and decryption

ENCRYPTBYASYMKEY DECRYPTBYASYMKEY
ENCRYPTBYCert DECRYPTBYCERT
ASYMKEYPROPERTY ASYMKEY_ID

Signing and signature verification

SIGNBYASYMKEY VERIFYSIGNEDBYASMKEY
SIGNBYCERT VERIGYSIGNEDBYCERT
IS_OBJECTSIGNED

Symmetric decryption with automatic key handling

DecryptByKeyAutoCert

Encryption hashing

HASHBYTES

Copying certificates

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

See also

Functions
Encryption Hierarchy
Permissions Hierarchy (Database Engine)
CREATE CERTIFICATE (Transact-SQL)
CREATE SYMMETRIC KEY (Transact-SQL)
CREATE ASYMMETRIC KEY (Transact-SQL)
Security Catalog Views (Transact-SQL)