Ejemplo n.º 1
0
        private void Dispose(bool Disposing)
        {
            if (!m_isDisposed && Disposing)
            {
                try
                {
                    if (_msgDigestOTS != null)
                    {
                        _msgDigestOTS.Dispose();
                        _msgDigestOTS = null;
                    }
                    if (_privateKeyOTS != null)
                    {
                        Array.Clear(_privateKeyOTS, 0, _privateKeyOTS.Length);
                        _privateKeyOTS = null;
                    }
                    if (_msgHash != null)
                    {
                        Array.Clear(_msgHash, 0, _msgHash.Length);
                        _msgHash = null;
                    }
                    if (_sgnCode != null)
                    {
                        Array.Clear(_sgnCode, 0, _sgnCode.Length);
                        _sgnCode = null;
                    }
                    if (_gmssRand != null)
                    {
                        _gmssRand.Dispose();
                        _gmssRand = null;
                    }
                    if (_otsSeed != null)
                    {
                        Array.Clear(_otsSeed, 0, _otsSeed.Length);
                        _otsSeed = null;
                    }
                    _mdSize   = 0;
                    m_keySize = 0;
                    _W        = 0;
                    _msgSize  = 0;
                    m_K       = 0;
                    _R        = 0;
                    _testCtr  = 0;
                    _Counter  = 0;
                    _iI       = 0;
                    _test8    = 0;
                    _big8     = 0;
                    _steps    = 0;
                    _chkSum   = 0;
                    _height   = 0;
                }
                catch { }

                m_isDisposed = true;
            }
        }
Ejemplo n.º 2
0
        private void Dispose(bool Disposing)
        {
            if (!m_isDisposed && Disposing)
            {
                try
                {
                    if (_msgDigestOTS != null)
                    {
                        _msgDigestOTS.Dispose();
                        _msgDigestOTS = null;
                    }
                    if (_gmssRandom != null)
                    {
                        _gmssRandom.Dispose();
                        _gmssRandom = null;
                    }
                    if (_leaf != null)
                    {
                        Array.Clear(_leaf, 0, _leaf.Length);
                        _leaf = null;
                    }
                    if (_concHashs != null)
                    {
                        Array.Clear(_concHashs, 0, _concHashs.Length);
                        _concHashs = null;
                    }
                    if (_seed != null)
                    {
                        Array.Clear(_seed, 0, _seed.Length);
                        _seed = null;
                    }
                    if (_privateKeyOTS != null)
                    {
                        Array.Clear(_privateKeyOTS, 0, _privateKeyOTS.Length);
                        _privateKeyOTS = null;
                    }
                    _mdsize    = 0;
                    m_keySize  = 0;
                    _ctr1      = 0;
                    _ctr2      = 0;
                    _twoPowerW = 0;
                    _W         = 0;
                    _steps     = 0;
                }
                catch { }

                m_isDisposed = true;
            }
        }
Ejemplo n.º 3
0
        private void Dispose(bool Disposing)
        {
            if (!m_isDisposed && Disposing)
            {
                try
                {
                    if (_gmssRand != null)
                    {
                        _gmssRand.Dispose();
                        _gmssRand = null;
                    }
                    if (m_rndEngine != null)
                    {
                        m_rndEngine.Dispose();
                        m_rndEngine = null;
                    }
                    if (_msDigestTree != null)
                    {
                        _msDigestTree.Dispose();
                        _msDigestTree = null;
                    }
                    if (_currentSeeds != null)
                    {
                        Array.Clear(_currentSeeds, 0, _currentSeeds.Length);
                        _currentSeeds = null;
                    }
                    if (_nextNextSeeds != null)
                    {
                        Array.Clear(_nextNextSeeds, 0, _nextNextSeeds.Length);
                        _nextNextSeeds = null;
                    }
                    if (_currentRootSigs != null)
                    {
                        Array.Clear(_currentRootSigs, 0, _currentRootSigs.Length);
                        _currentRootSigs = null;
                    }
                    if (_currentRootSigs != null)
                    {
                        Array.Clear(_currentRootSigs, 0, _currentRootSigs.Length);
                        _currentRootSigs = null;
                    }
                    _mdLength = 0;
                }
                catch { }

                m_isDisposed = true;
            }
        }
Ejemplo n.º 4
0
        private void Dispose(bool Disposing)
        {
            if (!m_isDisposed && Disposing)
            {
                try
                {
                    if (_msgDigestTrees != null)
                    {
                        _msgDigestTrees.Dispose();
                        _msgDigestTrees = null;
                    }
                    if (_gmssRandom != null)
                    {
                        _gmssRandom.Dispose();
                        _gmssRandom = null;
                    }
                    if (_index != null)
                    {
                        Array.Clear(_index, 0, _index.Length);
                        _index = null;
                    }
                    if (_currentAuthPaths != null)
                    {
                        Array.Clear(_currentAuthPaths, 0, _currentAuthPaths.Length);
                        _currentAuthPaths = null;
                    }
                    if (_subtreeRootSig != null)
                    {
                        Array.Clear(_subtreeRootSig, 0, _subtreeRootSig.Length);
                        _subtreeRootSig = null;
                    }
                    _mdLength = 0;
                    _numLayer = 0;
                }
                catch { }

                m_isDisposed = true;
            }
        }