I want to encrypt some content by AES/GCM/No padding approach. I checked .NET 5 provide the class AesGcm
After install PowerShell 7, I am able to call this object:
PS C:\> [Security.Cryptography.AesGcm]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False AesGcm System.Object
However I cannot call its Encrypt method:
PS C:\> [Security.Cryptography.AesGcm].Encrypt()
InvalidOperation: Method invocation failed because [System.RuntimeType] does not contain a method named 'encrypt'.
Did I miss some library or my syntax is wrong?