IronPigeon.CryptoSettings.ApplySecurityLevel C# (CSharp) Метод

ApplySecurityLevel() публичный Метод

Applies a security level to this object.
public ApplySecurityLevel ( IronPigeon.SecurityLevel securityLevel ) : void
securityLevel IronPigeon.SecurityLevel The security level.
Результат void
        public void ApplySecurityLevel(SecurityLevel securityLevel)
        {
            switch (securityLevel)
            {
                case SecurityLevel.Minimum:
                    this.SymmetricKeySize = 128;
                    this.AsymmetricKeySize = 512;
                    this.SymmetricHashAlgorithm = HashAlgorithm.Sha1;
                    break;
                case SecurityLevel.Maximum:
                    this.SymmetricKeySize = 256;
                    this.AsymmetricKeySize = 4096;
                    this.SymmetricHashAlgorithm = HashAlgorithm.Sha256;
                    break;
                default:
                    throw new ArgumentException();
            }
        }
    }