Skip to content

Latest commit

 

History

History
86 lines (70 loc) · 3.84 KB

File metadata and controls

86 lines (70 loc) · 3.84 KB
title Cryptographic Functions (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/15/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
dev_langs
TSQL
helpviewer_keywords
functions [SQL Server], cryptographic
crypto functions
cryptography [SQL Server], functions
decryption [SQL Server], functions
security functions
encryption [SQL Server], functions
ms.assetid 0be5626b-5a25-4d8c-9f44-7abbfccf816c
caps.latest.revision 16
author BYHAM
ms.author rickbyh
manager jhubbard

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)