Constructor CounterBasedPasswordGenerator
CounterBasedPasswordGenerator()
Default constructor
Declaration
public CounterBasedPasswordGenerator()
Remarks
Initialises the instance so it will erase assigned secrets on dispose or change of secret, and with no current secret allocated.
CounterBasedPasswordGenerator(Boolean)
Partial constructor.
Declaration
public CounterBasedPasswordGenerator(bool eraseSecrets)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM. |
Remarks
Use this if you are keeping secrets in memory and using them outside of class instances from this library, in which case eraseSecrets
should be false to prevent the data from being overwritten unexpectedly.
CounterBasedPasswordGenerator(Boolean, Byte[])
Full constructor, initialises this instance with an already known secret.
Declaration
public CounterBasedPasswordGenerator(bool eraseSecrets, byte[] secret)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM. |
System.Byte[] | secret | A byte array containign the secret to use for generating passwords. |
Remarks
If you are keeping secrets in memory and using them outside of class instances from this library, eraseSecrets
should be false to prevent the data from being overwritten unexpectedly.
CounterBasedPasswordGenerator()
Default constructor
Declaration
public CounterBasedPasswordGenerator()
Remarks
Initialises the instance so it will erase assigned secrets on dispose or change of secret, and with no current secret allocated.
CounterBasedPasswordGenerator(Boolean)
Partial constructor.
Declaration
public CounterBasedPasswordGenerator(bool eraseSecrets)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM. |
Remarks
Use this if you are keeping secrets in memory and using them outside of class instances from this library, in which case eraseSecrets
should be false to prevent the data from being overwritten unexpectedly.
CounterBasedPasswordGenerator(Boolean, Byte[])
Full constructor, initialises this instance with an already known secret.
Declaration
public CounterBasedPasswordGenerator(bool eraseSecrets, byte[] secret)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | eraseSecrets | If true, secrets asssigned are overwritten with zero value bytes when this instance is disposed, or if a new secret is assigned. This helps reduce the chance of secrets ending up in swap files or being scraped from RAM. |
System.Byte[] | secret | A byte array containign the secret to use for generating passwords. |
Remarks
If you are keeping secrets in memory and using them outside of class instances from this library, eraseSecrets
should be false to prevent the data from being overwritten unexpectedly.