Table of Contents

Interface ISecureData<T>

Namespace
ToSic.Sxc.Data
Assembly
ToSic.Sxc.dll

This object contains decrypted data (if it was encrypted originally) and tells you if the data was encrypted, signed etc. It's still very basic, and will grow in functionality to assist in handling secure / encrypted / signed data.

[PublicApi]
public interface ISecureData<out T>

Type Parameters

T

Type of this secure data - as of now it's always a string

Remarks

Introduced in 2sxc 12.05

Properties

IsSecured

Determines if the data is secure data, so it's either encrypted or signed

bool IsSecured { get; }

Property Value

bool

Remarks

made public in v17.01

Value

The value returned by the secure data - usually a string.

T Value { get; }

Property Value

T

Methods

IsSecuredBy(string)

Determines what authority secured this secure data. This is to figure out what certificate or source verified the decryption / signing

As of 2sxc 12.05, it can only be "preset", other keys are currently not handled yet

bool IsSecuredBy(string authorityName)

Parameters

authorityName string

Returns

bool

ToString()

This object explicitly has a ToString, so you can use the result in string concatenation like "key:" + secureResult

string ToString()

Returns

string