ProtectedMemory.Unprotect メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProtectedMemory.Unprotect メソッドの意味・解説 

ProtectedMemory.Unprotect メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

Protect メソッド使用して保護されメモリデータ保護解除します

名前空間: System.Security.Cryptography
アセンブリ: System.Security (system.security.dll 内)
構文構文

Public Shared Sub Unprotect
 ( _
    encryptedData As Byte(), _
    scope As MemoryProtectionScope _
)
Dim encryptedData As Byte()
Dim scope As MemoryProtectionScope

ProtectedMemory.Unprotect(encryptedData, scope)
public static void Unprotect
 (
    byte[] encryptedData,
    MemoryProtectionScope scope
)
public:
static void Unprotect (
    array<unsigned char>^ encryptedData, 
    MemoryProtectionScope scope
)
public static void Unprotect
 (
    byte[] encryptedData, 
    MemoryProtectionScope scope
)
public static function Unprotect
 (
    encryptedData : byte[], 
    scope : MemoryProtectionScope
)

パラメータ

encryptedData

復号化するメモリ内のバイト配列

scope

MemoryProtectionScope 値の 1 つ

例外例外
解説解説
使用例使用例

データ保護使用方法次のコード例示します

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 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ProtectedMemory クラス
ProtectedMemory メンバ
System.Security.Cryptography 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ProtectedMemory.Unprotect メソッド」の関連用語

ProtectedMemory.Unprotect メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ProtectedMemory.Unprotect メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS