]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_apple_csp/lib/desContext.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_apple_csp / lib / desContext.cpp
index 43890cfdce3d0f5f499c5f5f7c688db6d10b82ca..22531e0968e50e9777a3e7a559bebd395a51a04b 100644 (file)
@@ -65,6 +65,7 @@ void DESContext::init(
     if (DesInst != NULL)
     {
         CCCryptorRelease(DesInst);
+        DesInst = NULL;
     }
     
     (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithmDES, ccDefaultPadding, NULL, keyData, kCCKeySizeDES, NULL, 0, 0, 0, &DesInst);
@@ -152,6 +153,7 @@ void DES3Context::init(
 
     if (DesInst != NULL) {
         CCCryptorRelease(DesInst);
+        DesInst = NULL;
     }
     
     (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithm3DES, ccDefaultPadding, NULL, keyData, kCCKeySize3DES, NULL, 0, 0, 0, &DesInst);