Secret Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a secret value stored in memory.
public ref class Secret sealed : IDisposable, Microsoft::AspNetCore::DataProtection::ISecret
public sealed class Secret : IDisposable, Microsoft.AspNetCore.DataProtection.ISecret
type Secret = class
interface IDisposable
interface ISecret
type Secret = class
interface ISecret
interface IDisposable
Public NotInheritable Class Secret
Implements IDisposable, ISecret
- Inheritance
-
Secret
- Implements
Constructors
Secret(ArraySegment<Byte>) |
Creates a new Secret from the provided input value, where the input value is specified as an array segment. |
Secret(Byte[]) |
Creates a new Secret from the provided input value, where the input value is specified as an array. |
Secret(Byte*, Int32) |
Creates a new Secret from the provided input value, where the input value is specified as a pointer to unmanaged memory. |
Secret(ISecret) |
Creates a new Secret from another secret object. |
Properties
Length |
The length (in bytes) of the secret value. |
Methods
Dispose() |
Wipes the secret from memory. |
Random(Int32) |
Returns a Secret made entirely of random bytes retrieved from a cryptographically secure RNG. |
WriteSecretIntoBuffer(ArraySegment<Byte>) |
Writes the secret value to the specified buffer. |
WriteSecretIntoBuffer(Byte*, Int32) |
Writes the secret value to the specified buffer. |