Skip to content

howeyc/sqlcrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlcrypt sqlcrypt GoDoc

The repository contains methods written in Go mapping the functionality of two built-in SQL Server functions: EncryptByPassPhrase and DecryptByPassPhrase. These functions are used to encrypt a given string of characters or decrypt the ciphertext.

The result returned by the EncryptByPassphrase function can be decrypted using the DecryptByPassPhrase function on SQL Server. Also the DecryptByPassphrase method can decrypt ciphertext generated by the EncryptByPassPhrase function on SQL Server.

The EncryptByPassphrase method creates a V2 encrypted message.

The DecryptByPassphrase function reads the version number from the ciphertext.

Msg Version Crypto SQL Server Versions Supported
V1 TripleDES / SHA1 SQL Server 2008 - SQL Server 2016 No
V2 AES256 / SHA256 SQL Server 2017 Yes

This does not support add_authenticator and authenticator arguments, which are optional in the SQL Server methods.

Reference

About

Encrypt/Decrypt SQL Server Functions

Topics

Resources

License

Stars

Watchers

Forks

Languages