Table of Contents

ToSignedUri Method

Definition

Namespace
Cuemon.Extensions.Net.Security
Assemblies
Cuemon.Extensions.Net.dll
Source
src/Cuemon.Extensions.Net/Security/UriExtensions.cs

ToSignedUri(Uri, byte[], DateTime?, DateTime?, Action<SignedUriOptions>)

Converts the specified uri to a signed and tampering protected Uri.

public static Uri ToSignedUri(this Uri uri, byte[] secret, DateTime? signedStart = null, DateTime? signedExpiry = null, Action<SignedUriOptions> setup = null)

Parameters

uri Uri

The URI to protect from tampering.

secret byte[]

The secret key for the encryption.

signedStart DateTime?

The time, expressed as the Coordinated Universal Time (UTC), at which the signed URI becomes valid.

signedExpiry DateTime?

The time, expressed as the Coordinated Universal Time (UTC), at which the signed URI becomes invalid.

setup Action<SignedUriOptions>

The SignedUriOptions which may be configured.

Returns

Uri

A Uri that is equivalent to uri but signed and protected from tampering.