Isopoh.Cryptography.SecureArray 2.0.0

Isopoh

SecureArray

You can think of the SecureArray sort of like you would think of SecureString except that SecureString does crypto (usually - encryption isn't supported everywhere) to protect its sensitive data and has windows of vulnerability when it decrypts the string for use. SecureArray protects its data by locking the data into RAM to keep it from swapping to disk and also zeroing the buffer when disposed. So, unlike SecureString, any process with access to your process's memory will be able to read the data in your SecureArray, but you do not have to worry about your data persisting anywhere or multiple copies of your data floating around RAM due to C#'s memory management.

Because it locks the memory into RAM (and at a non-movable-by-the-garbage-collector location), you need to use it as infrequently as possible and for as short a time as possible. RAM secured this way puts stress on the computer as a whole by denying physical RAM for other processes and puts stress on your particular executable by denying freedom to the garbage collector to reduce fragmentation as needed for best performance.

Note: when using SecureArray in the browser (for example, under Blazor or UnoPlatform), the memory cannot be locked into RAM so SecureArray does its best effort to protect the data by zeroing the buffer when it is disposed.

Note similarly: when using SecureArray in a Universal Windows Platform (UWP) application, I have yet to figure out how to use the supposedly available VirtualAllocFromApp() system call to lock memory into RAM so SecureArray does its best effort to protect the data by zeroing the buffer when it is disposed.

Always dispose of your SecureArrays.

API GENERATION

The API Documentation at https://mheyman.github.io/Isopoh.Cryptography.Argon2 gets generated automatically upon build. This happens via a dummy C# "Doc" project that uses the DocFx NuGet package to produce the API documentation.

AUTHOR

Michael Heyman

ACKNOWLEDGMENTS

List of people and project that inspired creation of this one:

  • The many contributers of the Argon2 repository
  • and the cryptographers responsible for creating and testing that algorithm
  • @CodesInChaos for the fully managed Blake2b implementation here
  • @PurpleBooth for his readme template posted here

LICENSE

Creative Commons License
Isopoh.Cryptography.Argon2 by Michael Heyman is licensed under a Creative Commons Attribution 4.0 International License.

PRODUCTION STATUS & SUPPORT

You should be aware that this project is supported solely by me and provided as is.

Go back to the top

Showing the top 20 packages that depend on Isopoh.Cryptography.SecureArray.

Packages Downloads
Isopoh.Cryptography.Argon2
Argon2 Password Hasher written in C#. Uses Isopoh.Cryptography.Blake2 for hashing and Isopoh.Cryptography.SecureArray to protect sensitive data.
1
Isopoh.Cryptography.Blake2b
Blake2 hash for sensitive data. Uses Isopoh.Cryptography.SecureArray to assure sensitive data gets wiped from RAM and, if the operating system allows, never gets written to disk.
1

Bump version to match Isopoh.Cryptography.Argon2.

.NET Core 3.1

  • No dependencies.

.NET 6.0

  • No dependencies.

.NET 7.0

  • No dependencies.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
2.0.0 1 03/25/2026
1.1.12 0 05/22/2022
1.1.11 0 12/12/2021
1.1.10 0 11/18/2020
1.1.9 0 10/02/2020
1.1.8 0 07/26/2020
1.1.7 0 07/26/2020
1.1.6 0 07/25/2020
1.1.5 0 07/25/2020
1.1.4 0 07/05/2020
1.1.3 0 10/27/2019
1.1.2 0 05/14/2019
1.1.1 0 02/16/2019
1.1.0 0 02/16/2019
1.0.10 0 02/10/2019
1.0.9 0 02/10/2019
1.0.8 0 03/11/2018
1.0.7 0 03/11/2018
1.0.6 0 01/13/2018
1.0.5 0 10/29/2017
1.0.4 0 09/23/2017
1.0.3 0 09/10/2017
1.0.2 0 08/31/2017
1.0.1 0 03/08/2017
1.0.0 0 07/31/2016