ProtectedMemory.Unprotect メソッド
アセンブリ: System.Security (system.security.dll 内)

Dim encryptedData As Byte() Dim scope As MemoryProtectionScope ProtectedMemory.Unprotect(encryptedData, scope)

例外の種類 | 条件 |
---|---|
PlatformNotSupportedException | このメソッドがオペレーティング システムでサポートされていません。このメソッドは、Microsoft Windows 2000 以降のオペレーティング システムでのみ使用できます。 |


using System; using System.Security.Cryptography; public class MemoryProtectionSample { // Create aditional entropy for use with the Protect method. static byte [] s_aditionalEntropy = { 9, 8, 7, 6, 5 }; public static void Main() { // Create the original data to be encrypted (The data length should be a multiple of 16). byte [] secret = { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 }; // Encrypt the data in memory. The result is stored in the same same array as the original data. ProtectedMemory.Protect( secret, MemoryProtectionScope.SameLogon ); // Decrypt the data in memory and store in the original array. ProtectedMemory.Unprotect( secret, MemoryProtectionScope.SameLogon ); } }
#using <System.Security.dll> using namespace System; using namespace System::Security::Cryptography; int main() { // Create the original data to be encrypted (The data length should be a multiple of 16). array<Byte>^secret = {1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4}; // Encrypt the data in memory. The result is stored in the same same array as the original data. ProtectedMemory::Protect( secret, MemoryProtectionScope::SameLogon ); // Decrypt the data in memory and store in the original array. ProtectedMemory::Unprotect( secret, MemoryProtectionScope::SameLogon ); }
import System.*; import System.Security.Cryptography.*; public class MemoryProtectionSample { // Create aditional entropy for use with the Protect method. private static ubyte sAditionalEntropy[] = { 9, 8, 7, 6, 5 }; public static void main(String args[]) { // Create the original data to be encrypted (The data length should // be a multiple of 16). ubyte secret[] = { 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 }; // Encrypt the data in memory. The result is stored in the same same // array as the original data. ProtectedMemory.Protect(secret, MemoryProtectionScope.SameLogon); // Decrypt the data in memory and store in the original array. ProtectedMemory.Unprotect(secret, MemoryProtectionScope.SameLogon); } //main } //MemoryProtectionSample

Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からProtectedMemory.Unprotect メソッドを検索する場合は、下記のリンクをクリックしてください。

- ProtectedMemory.Unprotect メソッドのページへのリンク