EncryptedAndAuthenticatedData EncryptedAndAuthenticatedData EncryptedAndAuthenticatedData EncryptedAndAuthenticatedData Class

Contains data that can be retrieved from encrypted and authenticated data. Authenticated encryption algorithms are opened by using the SymmetricKeyAlgorithmProvider class.

Syntax

Declaration

public sealed class EncryptedAndAuthenticatedDatapublic sealed class EncryptedAndAuthenticatedDataPublic NotInheritable Class EncryptedAndAuthenticatedDatapublic sealed class EncryptedAndAuthenticatedData

Remarks

Authenticated encryption encrypts and authenticates content in one operation. An authenticator, also called a tag, is used during encryption and the output of the process contains a tag-ciphertext pair. For more information, see the AuthenticationTag and EncryptedData properties. The decryption process verifies the ciphertext against the tag.

You can use an authenticated encryption algorithm after calling the OpenAlgorithm(String) method on the SymmetricKeyAlgorithmProvider class and specifying the name of the algorithm to open. The following algorithm names are supported for authenticated encryption and decryption:

  • AES_GCM
  • AES_CCM

Examples

[!code-csharpShowEncryptedAuthenticatedDataClass]

Properties summary

Gets the authentication tag.

Gets the encrypted data.

Properties

  • AuthenticationTag
    AuthenticationTag
    AuthenticationTag
    AuthenticationTag

    Gets the authentication tag.

    public IBuffer AuthenticationTag { get; }public IBuffer AuthenticationTag { get; }Public ReadOnly Property AuthenticationTag As IBufferpublic IBuffer AuthenticationTag { get; }

    Property Value

  • EncryptedData
    EncryptedData
    EncryptedData
    EncryptedData

    Gets the encrypted data.

    public IBuffer EncryptedData { get; }public IBuffer EncryptedData { get; }Public ReadOnly Property EncryptedData As IBufferpublic IBuffer EncryptedData { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Security.Cryptography.Core.dll