ProtectedMemoryとは? わかりやすく解説

ProtectedMemory クラス

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

メモリ保護保護解除のためのメソッド提供します。このクラス継承できません。

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

Public NotInheritable Class
 ProtectedMemory
Dim instance As ProtectedMemory
public sealed class ProtectedMemory
public ref class ProtectedMemory sealed
public final class ProtectedMemory
public final class ProtectedMemory
解説解説
使用例使用例

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

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 
継承階層継承階層
System.Object
  System.Security.Cryptography.ProtectedMemory
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ProtectedMemory メンバ
System.Security.Cryptography 名前空間

ProtectedMemory メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ProtectedMemory クラス
System.Security.Cryptography 名前空間

ProtectedMemory メンバ

メモリ保護保護解除のためのメソッド提供します。このクラス継承できません。

ProtectedMemory データ型公開されるメンバを以下の表に示します


パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ProtectedMemory クラス
System.Security.Cryptography 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からProtectedMemoryを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProtectedMemoryを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProtectedMemory を検索

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

辞書ショートカット

すべての辞書の索引

「ProtectedMemory」の関連用語

ProtectedMemoryのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS