17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A – Views and Functions ReferenceWHEREBorrower_ID = 1;GOListing A-19: Syntax of EncryptByCert.)EncryptByKeyThis function is used to encrypt data with a symmetric key. The execution ofthis function is dependent upon the symmetric key being opened prior to itscall.USE HomeLending;GOOPEN SYMMETRIC KEY MySymKeyDECRYPT BY PASSWORD = N'MyStr0ngP@ssword2009';GOUPDATE dbo.Borrower_IdentificationSET Identification_Value =EncryptByKey(Key_GUID('MySymKey'),Identification_Value)WHEREBorrower_ID = 1;GOCLOSE SYMMETRIC KEY MySymKey;GOListing A-20: Syntax of EncryptByKey.EncryptByPassphraseThis function is used to encrypt data with a key that is generated from apassphrase.USE HomeLending;GOUPDATE dbo.Borrower_IdentificationSET Identification_Value =EncryptByPassphrase ('The Crow Flies At Midnight.',Identification_Value217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!