Editar

Compartir a través de


BinarySecretSecurityToken Constructors

Definition

Initializes a new instance of the BinarySecretSecurityToken class.

Overloads

BinarySecretSecurityToken(Byte[])

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(Int32)

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(String, Byte[])

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(String, Int32)

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(String, Byte[], Boolean)

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(String, Int32, Boolean)

Initializes a new instance of the BinarySecretSecurityToken class.

BinarySecretSecurityToken(Byte[])

Source:
BinarySecretSecurityToken.cs
Source:
BinarySecretSecurityToken.cs

Initializes a new instance of the BinarySecretSecurityToken class.

public:
 BinarySecretSecurityToken(cli::array <System::Byte> ^ key);
public BinarySecretSecurityToken (byte[] key);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : byte[] -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Public Sub New (key As Byte())

Parameters

key
Byte[]

A byte-array that represents the key.

Examples

The following code illustrates how to call the constructor.

BinarySecretSecurityToken CreateProofToken(byte[] proofKey)
{
    return new BinarySecretSecurityToken(proofKey);
}
Function CreateProofToken(ByVal proofKey() As Byte) As BinarySecretSecurityToken
    Return New BinarySecretSecurityToken(proofKey)

End Function

Applies to

BinarySecretSecurityToken(Int32)

Initializes a new instance of the BinarySecretSecurityToken class.

public:
 BinarySecretSecurityToken(int keySizeInBits);
public BinarySecretSecurityToken (int keySizeInBits);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : int -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Public Sub New (keySizeInBits As Integer)

Parameters

keySizeInBits
Int32

The key size in bits.

Applies to

BinarySecretSecurityToken(String, Byte[])

Source:
BinarySecretSecurityToken.cs
Source:
BinarySecretSecurityToken.cs

Initializes a new instance of the BinarySecretSecurityToken class.

public:
 BinarySecretSecurityToken(System::String ^ id, cli::array <System::Byte> ^ key);
public BinarySecretSecurityToken (string id, byte[] key);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : string * byte[] -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Public Sub New (id As String, key As Byte())

Parameters

id
String

The token ID.

key
Byte[]

A byte-array that represents the key.

Applies to

BinarySecretSecurityToken(String, Int32)

Initializes a new instance of the BinarySecretSecurityToken class.

public:
 BinarySecretSecurityToken(System::String ^ id, int keySizeInBits);
public BinarySecretSecurityToken (string id, int keySizeInBits);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : string * int -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Public Sub New (id As String, keySizeInBits As Integer)

Parameters

id
String

The token ID.

keySizeInBits
Int32

The key size in bits.

Exceptions

Either keySizeInBits is less than or equal to zero, or it is greater than or equal to 512, or it is not a multiple of 8.

Applies to

BinarySecretSecurityToken(String, Byte[], Boolean)

Source:
BinarySecretSecurityToken.cs
Source:
BinarySecretSecurityToken.cs

Initializes a new instance of the BinarySecretSecurityToken class.

protected:
 BinarySecretSecurityToken(System::String ^ id, cli::array <System::Byte> ^ key, bool allowCrypto);
protected BinarySecretSecurityToken (string id, byte[] key, bool allowCrypto);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : string * byte[] * bool -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Protected Sub New (id As String, key As Byte(), allowCrypto As Boolean)

Parameters

id
String

The token ID.

key
Byte[]

A byte-array that represents the key.

allowCrypto
Boolean

A Boolean that indicates whether to allow cryptography.

Exceptions

key is null.

Applies to

BinarySecretSecurityToken(String, Int32, Boolean)

Source:
BinarySecretSecurityToken.cs
Source:
BinarySecretSecurityToken.cs

Initializes a new instance of the BinarySecretSecurityToken class.

protected:
 BinarySecretSecurityToken(System::String ^ id, int keySizeInBits, bool allowCrypto);
protected BinarySecretSecurityToken (string id, int keySizeInBits, bool allowCrypto);
new System.ServiceModel.Security.Tokens.BinarySecretSecurityToken : string * int * bool -> System.ServiceModel.Security.Tokens.BinarySecretSecurityToken
Protected Sub New (id As String, keySizeInBits As Integer, allowCrypto As Boolean)

Parameters

id
String

The token ID.

keySizeInBits
Int32

The key size in bits.

allowCrypto
Boolean

A Boolean that indicates whether to allow cryptography.

Exceptions

Either keySizeInBits is less than or equal to zero, or it is greater than or equal to 512, or it is not a multiple of 8.

Applies to