Exemplo n.º 1
0
        public GostKeyExchangeAlgorithm(SafeProvHandleImpl provHandle, SafeKeyHandleImpl keyHandle, Asn1.Common.GostKeyExchangeParameters keyExchangeParameters)
        {
            if (provHandle == null)
            {
                throw ExceptionUtility.ArgumentNull("provHandle");
            }

            if (keyHandle == null)
            {
                throw ExceptionUtility.ArgumentNull("keyHandle");
            }

            if (keyExchangeParameters == null)
            {
                throw ExceptionUtility.ArgumentNull("keyExchangeParameters");
            }

            _provHandle            = provHandle.DangerousAddRef();
            _keyHandle             = keyHandle.DangerousAddRef();
            _keyExchangeParameters = keyExchangeParameters;
        }
Exemplo n.º 2
0
        public GostSharedSecretAlgorithm(SafeProvHandleImpl provHandle, SafeKeyHandleImpl keyHandle, GostKeyExchangeParameters keyExchangeParameters, GostAlgorithmType algType)
        {
            if (provHandle == null)
            {
                throw ExceptionUtility.ArgumentNull("provHandle");
            }

            if (keyHandle == null)
            {
                throw ExceptionUtility.ArgumentNull("keyHandle");
            }

            if (keyExchangeParameters == null)
            {
                throw ExceptionUtility.ArgumentNull("keyExchangeParameters");
            }

            _provHandle            = provHandle.DangerousAddRef();
            _keyHandle             = keyHandle.DangerousAddRef();
            _keyExchangeParameters = keyExchangeParameters;
            _algType = algType;
        }
        protected Gost_R3410_KeyExchangeAlgorithm(ProviderType providerType, SafeProvHandleImpl provHandle, SafeKeyHandleImpl keyHandle, Gost_R3410_KeyExchangeParams keyExchangeParameters, int keySize, int signatureAlgId) : base(providerType)
        {
            if (provHandle == null)
            {
                throw ExceptionUtility.ArgumentNull(nameof(provHandle));
            }

            if (keyHandle == null)
            {
                throw ExceptionUtility.ArgumentNull(nameof(keyHandle));
            }

            if (keyExchangeParameters == null)
            {
                throw ExceptionUtility.ArgumentNull(nameof(keyExchangeParameters));
            }

            _provHandle            = provHandle.DangerousAddRef();
            _keyHandle             = keyHandle.DangerousAddRef();
            _keyExchangeParameters = keyExchangeParameters;
            _keySize        = keySize;
            _signatureAlgId = signatureAlgId;
        }