Beispiel #1
0
void Aws::Utils::Crypto::CleanupCrypto()
{
    if(s_MD5Factory)
    {
        s_MD5Factory->CleanupStaticState();
        s_MD5Factory = nullptr;
    }

    if(s_Sha256Factory)
    {
        s_Sha256Factory->CleanupStaticState();
        s_Sha256Factory = nullptr;
    }

    if(s_Sha256HMACFactory)
    {
        s_Sha256HMACFactory->CleanupStaticState();
        s_Sha256HMACFactory =  nullptr;
    }

    if(s_AES_CBCFactory)
    {
        s_AES_CBCFactory->CleanupStaticState();
        s_AES_CBCFactory = nullptr;
    }

    if(s_AES_CTRFactory)
    {
        s_AES_CTRFactory->CleanupStaticState();
        s_AES_CTRFactory = nullptr;
    }

    if(s_AES_GCMFactory)
    {
        s_AES_GCMFactory->CleanupStaticState();
        s_AES_GCMFactory = nullptr;
    }

    if(s_AES_KeyWrapFactory)
    {
        s_AES_KeyWrapFactory->CleanupStaticState();
        s_AES_KeyWrapFactory = nullptr;
    }

    if(s_SecureRandomFactory)
    {
        s_SecureRandom = nullptr;
        s_SecureRandomFactory->CleanupStaticState();
        s_SecureRandomFactory = nullptr;
    }   
}