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

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

RNGCryptoServiceProvider.GetNonZeroBytes メソッド

バイト配列に、暗号化使用するランダムな 0 以外の値の厳密なシーケンス設定します

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

Public Overrides Sub GetNonZeroBytes
 ( _
    data As Byte() _
)
Dim instance As RNGCryptoServiceProvider
Dim data As Byte()

instance.GetNonZeroBytes(data)
public override void GetNonZeroBytes (
    byte[] data
)
public:
virtual void GetNonZeroBytes (
    array<unsigned char>^ data
) override
public void GetNonZeroBytes (
    byte[] data
)
public override function GetNonZeroBytes (
    data : byte[]
)

パラメータ

data

暗号化使用するランダムな 0 以外の値の厳密なシーケンス格納する配列

例外例外
例外種類条件

CryptographicException

暗号サービス プロバイダ (CSP) を取得できません。

解説解説
使用例使用例

100 バイト長の 0 以外の値のランダム シーケンス作成しrandom格納する方法次のコード例示します

Dim random() As Byte = New
 Byte(100) {}
'RNGCryptoServiceProvider is an implementation of an RNG
Dim rng As New RNGCryptoServiceProvider()
rng.GetNonZeroBytes(random) ' bytes in random are now random and none
 are zero
byte[] random = new Byte[100];
//RNGCryptoServiceProvider is an implementation of a random number generator.
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetNonZeroBytes(random); // The array is now filled with cryptographically
 strong random bytes, and none are zero.
array<Byte>^ random = gcnew array<Byte>(100);
//RNGCryptoServiceProvider is an implementation of a random number generator.
RNGCryptoServiceProvider^ rng = gcnew RNGCryptoServiceProvider;
rng->GetNonZeroBytes( random ); // The array is now filled with cryptographically
 strong random bytes, and none are zero.
ubyte random[] = new ubyte[100];

//RNGCryptoServiceProvider is an implementation of a
// random number generator.
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();

rng.GetNonZeroBytes(random); 
// The array is now filled with cryptographically strong random bytes,
 
// and none are zero.

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RNGCryptoServiceProvider クラス
RNGCryptoServiceProvider メンバ
System.Security.Cryptography 名前空間
その他の技術情報
暗号サービス



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS