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 名前空間



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

辞書ショートカット

すべての辞書の索引

「ProtectedMemory クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS