동일한 도메인의 다른 사용자 계정에서 실행중인 다른 asp.net 응용 프로그램이 암호를 해독하는 중요한 데이터를 암호화하는 asp.net 응용 프로그램을 작성하고 있습니다.DPAPI를 사용하는 보안 Crypto 키
DPAPI를 사용하여 키 관리를 OS 수준에 전달하라는 많은 기사를 읽었습니다.
이 시나리오에서는 어떻게 DPAPI를 사용할 수 있습니까? 나는 파일이나 데이터베이스에 암호 키를 저장하고 싶지 않다. 당신이 여기서하고있는 것은
Imports System.Security.Cryptography
' ....
Dim sensitiveDataBytes() As Byte = Encoding.Unicode.GetBytes(sensitiveData)
Dim entropy As Byte() = Guid.NewGuid().ToByteArray()
Dim encryptedSensitiveDataBytes() As Byte = ProtectedData.Protect(sensitiveDataBytes, entropy, DataProtectionScope.LocalMachine)
Dim entropyPlusSensitiveData As Byte() = entropy.Concat(encryptedSensitiveDataBytes).ToArray()
Return entropyPlusSensitiveData
당신이 System.Security.Cryptography.ProtectedData
을 사용하고 있습니다 :