Show / Hide Table of Contents

Class SecureByteArray

A mutable structure intended to make it easier to hold sensitive data in memory.

Inheritance
Object
SecureByteArray
Implements
IDisposable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: PKWARE.Smartcrypt.Protocol
Assembly: SmartcryptProtocol.dll
Syntax
public sealed class SecureByteArray : IDisposable
Remarks

This class is not thread safe. This class currently makes no security guarantees, it simply provides a simple way to ensure that sensitive data are removed from memory. When disposed, the data contained within will be zeroed out.

Properties

Bytes

Declaration
public byte[] Bytes { get; }
Property Value
Type Description
Byte[]
Exceptions
Type Condition
ObjectDisposedException

If this object has been disposed before the bytes are retrieved.

Methods

Dispose()

Declaration
public void Dispose()

Finalize()

Declaration
protected void Finalize()

WithCopyOf(Byte[])

Creates a deep copy of the provided array.

Declaration
public static SecureByteArray WithCopyOf(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes
Returns
Type Description
SecureByteArray

WithOwnershipOf(Byte[])

Holds a reference to the provided array.

Declaration
public static SecureByteArray WithOwnershipOf(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes
Returns
Type Description
SecureByteArray

Implements

System.IDisposable
Back to top Copyright © 2018 PKWARE, Inc.