MemoryProtectionScope 列挙体とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MemoryProtectionScope 列挙体の意味・解説 

MemoryProtectionScope 列挙体

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

Protect メソッドにより適用されるメモリ保護スコープ指定します

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

Public Enumeration MemoryProtectionScope
Dim instance As MemoryProtectionScope
public enum MemoryProtectionScope
public enum class MemoryProtectionScope
public enum MemoryProtectionScope
public enum MemoryProtectionScope
メンバメンバ
解説解説
使用例使用例

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

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



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

辞書ショートカット

すべての辞書の索引

MemoryProtectionScope 列挙体のお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS