Aracılığıyla paylaş


SecureRandom.GetSeed(Int32) Method

Definition

Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.

[Android.Runtime.Register("getSeed", "(I)[B", "")]
public static byte[]? GetSeed (int numBytes);
[<Android.Runtime.Register("getSeed", "(I)[B", "")>]
static member GetSeed : int -> byte[]

Parameters

numBytes
Int32

the number of seed bytes to generate.

Returns

Byte[]

the seed bytes.

Attributes

Remarks

Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself. This call may be used to seed other random number generators.

This method is only included for backwards compatibility. The caller is encouraged to use one of the alternative getInstance methods to obtain a SecureRandom object, and then call the generateSeed method to obtain seed bytes from that object.

Java documentation for java.security.SecureRandom.getSeed(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to