Beispiel #1
0
        public AesCcm(ReadOnlySpan <byte> key)
        {
            ThrowIfNotSupported();

            AesAEAD.CheckKeySize(key.Length);
            ImportKey(key);
        }
Beispiel #2
0
        public AesCcm(byte[] key)
        {
            ThrowIfNotSupported();

            ArgumentNullException.ThrowIfNull(key);

            AesAEAD.CheckKeySize(key.Length);
            ImportKey(key);
        }
Beispiel #3
0
        public AesGcm(byte[] key)
        {
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }

            AesAEAD.CheckKeySize(key.Length * 8);
            ImportKey(key);
        }
Beispiel #4
0
        public AesCcm(byte[] key)
        {
            ThrowIfNotSupported();

            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }

            AesAEAD.CheckKeySize(key.Length);
            ImportKey(key);
        }
Beispiel #5
0
 public AesGcm(ReadOnlySpan <byte> key)
 {
     AesAEAD.CheckKeySize(key.Length * 8);
     ImportKey(key);
 }