Click or drag to resize

CHAPSecret Class

This class is used for the CHAP secret properties, TargetSecret and InitiatorSecret
in the AddAccountRequest, ModifyAccountRequest, and Account classes.
Call .ToString() or the .Secret property to get the string value of a previously set CHAP secret.
When setting a CHAP secret you can either call the static method CHAPSecret.AutoGenerate()
which will instruct the API to regenerate a new CHAP secret or
you can set it directly using the Secret property.
Example:
var targetSecret = CHAPSecret.AutoGenerate(); // will tell the API to auto generate a new CHAP secret
var targetSecret = new CHAPSecret("thenewsecretvalue"); // or
var targetSecret = new CHAPSecret() { Secret = "thenewsecretvalue"}; // will assign the secret.
To discover the value of the CHAPSecret from this object:
var secret = targetSecret.ToString(); // or
var secret = targetSecret.Secret;
Inheritance Hierarchy
SystemObject
  SolidFire.Element.ApiCHAPSecret

Namespace:  SolidFire.Element.Api
Assembly:  SolidFire.SDK (in SolidFire.SDK.dll) Version: 12.3.0.0
Syntax
C#
public class CHAPSecret

The CHAPSecret type exposes the following members.

Constructors
  NameDescription
Public methodCHAPSecret
This will construct an empty, non-autogenerated CHAPSecret object.
Public methodCHAPSecret(String)
This will construct a new CHAPSecret object and set the Secret property to the value in the "secret" parameter.
Top
Properties
  NameDescription
Public propertySecret
This property is used to get or set the Secret property which is a string
Public propertyShouldAutoGenerate
This property is used to get the boolean value indicating if the Secret will be autogenerated by the API.
You cannot set this directly. Instead call:
CHAPSecret.AutoGenerate();
to construct a CHAPSecret object with this property set to true.
Top
Methods
  NameDescription
Public methodStatic memberAutoGenerate
Use this static method to construct a CHAPSecret object with the ShouldAutoGenerate property set to true
which, when passed into the AddAccount or ModifyAccount methods, will indicate to the API to autogenerate
a new CHAP secret value for either the TargetSecret and InitiatorSecret properties of the Account object.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns the string value in the Secret property which is the actual CHAPSecret value
(Overrides ObjectToString.)
Top
See Also