MCITP

MCITP

Thursday, March 10, 2011

Password encrypt and decrypt of a string

SELECT
encryptbyPASSphrase('key','ABC')
SELECT
CONVERT(VARCHAR(100),DecryptbyPASSphrase('key',0x01000000D5635122845D73E9C224A4B4007A61A9673055D29C966C81))
select
EncryptByPassPhrase('key', 'abc' )
result encrypted
value: 0x01000000674FB952B3F9D575EB4B9E7A22BEC4800F6310C7 F96CA821
select
convert(varchar(100),DecryptByPassPhrase('key', 0x01000000011FFAE33EA305F8DE68453A1CE3425C3F663849D02F21CE))

No comments:

Post a Comment