Ejemplo n.º 1
0
        /// <summary>
        /// Releases all resources used by the current instance of the <see cref="PBKDF2"/> class.
        /// </summary>
        public void Dispose()
        {
            if (!isDisposed)
            {
                if (!(hmacFunc is null))
                {
                    hmacFunc.Dispose();
                }
                hmacFunc = null;

                isDisposed = true;
            }
        }
Ejemplo n.º 2
0
        private bool isDisposed = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!isDisposed)
            {
                if (disposing)
                {
                    if (hmacFunc != null)
                    {
                        hmacFunc.Dispose();
                    }
                    hmacFunc = null;
                }

                isDisposed = true;
            }
        }