Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Security.​Cryptography.​AesCcm

Assembly: System.Security.Cryptography

Inheritance: object → AesCcm

Represents an Advanced Encryption Standard (AES) key to be used with the Counter with CBC-MAC (CCM) mode of operation.

Methods

public void
Decrypt​(byte[] nonce, byte[] ciphertext, byte[] tag, byte[] plaintext, byte[] associatedData = null)
nonce The nonce associated with this message, which must match the value provided during encryption.
ciphertext The encrypted content to decrypt.
tag The authentication tag produced for this message during encryption.
plaintext The byte array to receive the decrypted contents.
associatedData Extra data associated with this message, which must match the value provided during encryption.
Decrypts the ciphertext into the provided destination buffer if the authentication tag can be validated.
public void
Decrypt​(ReadOnlySpan`1 nonce, ReadOnlySpan`1 ciphertext, ReadOnlySpan`1 tag, Span`1 plaintext, ReadOnlySpan`1 associatedData = null)
public void
Dispose​()
Releases the resources used by the current instance of the <see cref="T:System.Security.Cryptography.AesCcm" /> class.
public void
Encrypt​(byte[] nonce, byte[] plaintext, byte[] ciphertext, byte[] tag, byte[] associatedData = null)
nonce The nonce associated with this message, which should be a unique value for every operation with the same key.
plaintext The content to encrypt.
ciphertext The byte array to receive the encrypted contents.
tag The byte array to receive the generated authentication tag.
associatedData Extra data associated with this message, which must also be provided during decryption.
Encrypts the plaintext into the ciphertext destination buffer and generates the authentication tag into a separate buffer.
public void
Encrypt​(ReadOnlySpan`1 nonce, ReadOnlySpan`1 plaintext, Span`1 ciphertext, Span`1 tag, ReadOnlySpan`1 associatedData = null)
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object