SQL 2005 이상에서만 사용 가능
DECLARE @Passphrase varchar(128) --암호 키워드
DECLARE @PlainText varchar(100) --평문 문자열
DECLARE @CryptText varbinary(200) --암호화 문자열
DECLARE @DecryptText varchar(100) --복호화 문자열
SET @PlainText = '810130-1045773'
SET @Passphrase = 'ZEPONG'
SET @CryptText = EncryptByPassPhrase(@Passphrase, @PlainText)
SET @DecryptText = DecryptByPassPhrase(@Passphrase, @CryptText)
--데이터 조회
SELECT @PlainText AS '문자열', @CryptText AS '암호화', @DecryptText AS '복호화'
0 개의 댓글:
댓글 쓰기