예제 #1
0
        /// <summary>Detect if the current CPU supports the required instructions (SSSE3, aesni, pcmul).</summary>
        /// <returns><c>true</c> if the CPU supports the necessary instructions, otherwise <c>false</c></returns>
        /// <remarks>Use <see cref="SecretAead" /> if portability is required.</remarks>
        public static bool IsAvailable()
        {
            SodiumCore.Init();

            return(SodiumLibrary.crypto_aead_aes256gcm_is_available() != 0);
        }