/macosx-10.10/Security-57031.1.35/Security/include/security_utilities/ |
H A D | hashing.cpp | 46 CCHashInstance::CCHashInstance(CCDigestAlg alg) argument 48 if (!(mDigest = CCDigestCreate(alg)))
|
/macosx-10.10/Security-57031.1.35/Security/libsecurity_utilities/lib/ |
H A D | hashing.cpp | 46 CCHashInstance::CCHashInstance(CCDigestAlg alg) argument 48 if (!(mDigest = CCDigestCreate(alg)))
|
/macosx-10.10/bind9-45.101/bind9/bin/confgen/ |
H A D | keygen.h | 28 void generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg, 33 dns_secalg_t alg); 35 const char *alg_totext(dns_secalg_t alg); 37 int alg_bits(dns_secalg_t alg);
|
/macosx-10.10/Heimdal-398.1.2/lib/otp/ |
H A D | otptest.c | 43 OtpAlgorithm *alg) 54 if (otp_parse (key2, buf, alg)) { 69 char *alg; member in struct:test 116 for(t = tests; t->alg; ++t) { 118 OtpAlgorithm *alg = otp_find_alg (t->alg); local 121 if (alg == NULL) { 122 printf ("Could not find alg %s\n", t->alg); 125 if(alg 41 test_one(OtpKey key1, char *name, char *val, void (*print)(OtpKey,char*, size_t), OtpAlgorithm *alg) argument [all...] |
/macosx-10.10/mDNSResponder-561.1.1/mDNSCore/ |
H A D | CryptoAlg.c | 51 mDNSexport mStatus CryptoAlgInit(mDNSu8 alg, AlgFuncs *func) argument 53 if (alg >= CRYPTO_ALG_MAX) 55 LogMsg("CryptoAlgInit: alg %d exceeds bounds", alg); 60 if (alg != CRYPTO_RSA_SHA1 && alg != CRYPTO_RSA_SHA256 && alg != CRYPTO_RSA_SHA512 && 61 alg != CRYPTO_DSA_NSEC3_SHA1 && alg != CRYPTO_RSA_NSEC3_SHA1) 63 LogMsg("CryptoAlgInit: alg 71 EncAlgInit(mDNSu8 alg, AlgFuncs *func) argument 91 AlgCreate(AlgType type, mDNSu8 alg) argument [all...] |
/macosx-10.10/OpenSSL098-52/src/crypto/asn1/ |
H A D | x_algor.c | 80 int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval) 82 if (!alg) 86 if (alg->parameter == NULL) 87 alg->parameter = ASN1_TYPE_new(); 88 if (alg->parameter == NULL) 91 if (alg) 93 if (alg->algorithm) 94 ASN1_OBJECT_free(alg->algorithm); 95 alg->algorithm = aobj; 101 if (alg [all...] |
/macosx-10.10/CommonCrypto-60061/test/CommonCrypto/ |
H A D | CommonCryptoSymCBC.c | 47 CCAlgorithm alg; 54 alg = kCCAlgorithmAES128; 63 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 66 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 73 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 76 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 83 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 86 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 93 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 96 retval = CCMultiCryptTestCase(keyStr, iv, alg, option [all...] |
H A D | CommonCryptoSymCFB.c | 42 CCAlgorithm alg; 48 alg = kCCAlgorithmAES128; 56 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 63 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 70 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 78 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 86 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 94 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 100 alg = kCCAlgorithmBlowfish; 107 retval = CCModeTestCase(keyStr, iv, mode, alg, paddin [all...] |
H A D | CommonCryptoNoPad.c | 16 static size_t testkeySize(CCAlgorithm alg) { 17 switch(alg) { 27 static size_t testblockSize(CCAlgorithm alg) { 28 switch(alg) { 39 testFinal(CCOperation op, CCMode mode, CCAlgorithm alg, 44 size_t keyLength = testkeySize(alg); 45 size_t blockSize = testblockSize(alg); 60 status = CCCryptorCreateWithMode(op, mode, alg, ccNoPadding, iv, key, keyLength, NULL, 0, 0, 0, &cryptorRef); 90 CCAlgorithm alg; 94 alg [all...] |
H A D | CommonCryptoSymOFB.c | 42 CCAlgorithm alg; 49 alg = kCCAlgorithmAES128; 57 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 64 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 71 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 79 alg = kCCAlgorithmAES128; 83 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 91 alg = kCCAlgorithmAES128; 95 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText);
|
H A D | CCCryptorTestFuncs.h | 21 CCMultiCrypt(CCOperation op, CCAlgorithm alg, CCOptions options, const void *key, size_t keyLength, const void *iv, const void *dataIn, size_t dataInLength, 28 CCCryptWithMode(CCOperation op, CCMode mode, CCAlgorithm alg, CCPadding padding, const void *iv, 35 CCMultiCryptWithMode(CCOperation op, CCMode mode, CCAlgorithm alg, CCPadding padding, const void *iv, 43 CCCryptTestCase(char *keyStr, char *ivStr, CCAlgorithm alg, CCOptions options, char *cipherText, char *plainText); 47 CCMultiCryptTestCase(char *keyStr, char *ivStr, CCAlgorithm alg, CCOptions options, char *cipherText, char *plainText); 51 CCModeTestCase(char *keyStr, char *ivStr, CCMode mode, CCAlgorithm alg, CCPadding padding, char *cipherText, char *plainText); 55 CCMultiModeTestCase(char *keyStr, char *ivStr, CCMode mode, CCAlgorithm alg, CCPadding padding, char *cipherText, char *plainText); 58 CCCryptorGCMTestCase(char *keyStr, char *ivStr, char *aDataStr, char *tagStr, CCAlgorithm alg, char *cipherText, char *plainText); 60 CCCryptorGCMDiscreetTestCase(char *keyStr, char *ivStr, char *aDataStr, char *tagStr, CCAlgorithm alg, char *cipherText, char *plainText);
|
H A D | CommonCryptoSymGCM.c | 53 CCAlgorithm alg; 56 alg = kCCAlgorithmAES128; 69 retval = CCCryptorGCMTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 74 retval = CCCryptorGCMDiscreetTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 88 retval = CCCryptorGCMTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 91 retval = CCCryptorGCMDiscreetTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 104 retval = CCCryptorGCMTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 107 retval = CCCryptorGCMDiscreetTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 120 retval = CCCryptorGCMTestCase(keyStr, iv, adata, tag, alg, cipherText, plainText); 123 retval = CCCryptorGCMDiscreetTestCase(keyStr, iv, adata, tag, alg, cipherTex [all...] |
H A D | CommonNISTKDF.c | 34 CCDigestName(CCDigestAlgorithm alg) { 35 switch(alg) { 45 static int test_answer(CCDigestAlgorithm alg, test_vector *vector, size_t answer_len, void*answer) { 47 switch(alg) { 57 diag("Returned Answer for Test (%d) for NistKDF-CTR-HMac-%s\n", vector->testnum, CCDigestName(alg)); 58 diag("\t\t\"%s\", // %s\n", bytesToHexString(answer_bb), CCDigestName(alg)); 64 diag("Failed Test (%d) for NistKDF-CTR-HMac-%s\n", vector->testnum, CCDigestName(alg)); 73 static int test_ctr_hmac_fixed_oneshot(CCDigestAlgorithm alg, test_vector *vector) { 78 CCKeyDerivationHMac(kCCKDFAlgorithmCTR_HMAC_FIXED, alg, 0, k1->bytes, k1->len, NULL, 0, 82 ok(test_answer(alg, vecto [all...] |
H A D | CommonHMac.c | 83 static char * testString(char *format, CCDigestAlgorithm alg) { argument 85 sprintf(thestring, format, digestName(alg)); 89 static int testOriginalOneShotHMac(CCDigestAlgorithm alg, byteBuffer key, char *input, byteBuffer expected) { argument 90 CCHmacAlgorithm hmacAlg = digestID2HMacID(alg); 91 byteBuffer computedMD = mallocDigestByteBuffer(alg); 95 ok(status = expectedEqualsComputed(testString("Original OneShot HMac-%s", alg), expected, computedMD), "HMac is as expected"); 100 static int testOriginalDiscreetHMac(CCDigestAlgorithm alg, byteBuffer key, char *input, byteBuffer expected) { argument 101 CCHmacAlgorithm hmacAlg = digestID2HMacID(alg); 102 byteBuffer computedMD = mallocDigestByteBuffer(alg); 109 ok(status = expectedEqualsComputed(testString("Original Discreet HMac-%s", alg), expecte 114 testNewOneShotHMac(CCDigestAlgorithm alg, byteBuffer key, char *input, byteBuffer expected) argument 124 testNewDiscreetHMac(CCDigestAlgorithm alg, byteBuffer key, char *input, byteBuffer expected) argument 144 testAllHMacs(CCDigestAlgorithm alg, byteBuffer key, char *input, byteBuffer expected) argument [all...] |
H A D | CommonKeyDerivation.c | 26 CCDigestAlgorithm alg; member in struct:KDFVector_t 43 static char * testString(char *format, CCDigestAlgorithm alg) { argument 45 sprintf(thestring, format, digestName(alg)); 50 static int testOriginalKDF(char *password, char *salt, int rounds, CCDigestAlgorithm alg, int dklen, byteBuffer expected, int expected_failure) { argument 51 CCPseudoRandomAlgorithm prf = digestID2PRF(alg); 59 ok(status = expectedEqualsComputed(testString("Original PBKDF2-HMac-%s", alg), expected, derivedKey), "Derived key is as expected"); 64 static int testNewKDF(char *password, char *salt, int rounds, CCDigestAlgorithm alg, int dklen, byteBuffer expected, int expected_failure) { argument 68 CCStatus retval = CCKeyDerivationHMac(kCCKDFAlgorithmPBKDF2_HMAC, alg, rounds, password, strlen(password), NULL, 0, NULL, 0, NULL, 0, salt, strlen(salt), derivedKey->bytes, derivedKey->len); 72 ok(status = expectedEqualsComputed(testString("New PBKDF2-HMac-%s", alg), expected, derivedKey), "Derived key is as expected"); 84 ok(status = testOriginalKDF(kdfvec->password, kdfvec->salt, kdfvec->rounds, kdfvec->alg, kdfve [all...] |
H A D | CommonCryptoSymRC2.c | 53 CCAlgorithm alg; 59 alg = kCCAlgorithmRC2; 69 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 72 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 81 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 84 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 93 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 96 retval = CCMultiCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 106 retval = CCCryptTestCase(keyStr, iv, alg, options, cipherText, plainText); 109 retval = CCMultiCryptTestCase(keyStr, iv, alg, option [all...] |
H A D | CommonCryptoBlowfish.c | 44 CCAlgorithm alg; 51 alg = kCCAlgorithmBlowfish; 56 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText);
|
H A D | CommonCryptoCTSPadding.c | 47 CCAlgorithm alg; 56 alg = kCCAlgorithmAES128; 65 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 73 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 81 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 92 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 100 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 108 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 118 retval = CCModeTestCase(keyStr, iv, mode, alg, padding, cipherText, plainText); 126 retval = CCModeTestCase(keyStr, iv, mode, alg, paddin [all...] |
/macosx-10.10/Heimdal-398.1.2/lib/hcrypto/ |
H A D | ccdigest.c | 120 CCDigestAlg alg; member in struct:CCDigestCtx_s 125 CCDigestCreate(CCDigestAlg alg) argument 127 CCDigestRef ctx = calloc(1, sizeof(*ctx) + alg->ctx_size); 131 ctx->alg = alg; 132 ctx->alg->init((struct hc_md_ctx *)&ctx[1]); 141 ctx->alg->update((struct hc_md_ctx *)&ctx[1], data, length); 148 ctx->alg->final(output, (struct hc_md_ctx *)&ctx[1]); 155 CCDigestAlg alg = ctx->alg; local [all...] |
/macosx-10.10/OpenSSL098-52/src/crypto/engine/ |
H A D | eng_fat.c | 97 static int int_def_cb(const char *alg, int len, void *arg) argument 100 if (!strncmp(alg, "ALL", len)) 102 else if (!strncmp(alg, "RSA", len)) 104 else if (!strncmp(alg, "DSA", len)) 106 else if (!strncmp(alg, "ECDH", len)) 108 else if (!strncmp(alg, "ECDSA", len)) 110 else if (!strncmp(alg, "DH", len)) 112 else if (!strncmp(alg, "RAND", len)) 114 else if (!strncmp(alg, "CIPHERS", len)) 116 else if (!strncmp(alg, "DIGEST [all...] |
/macosx-10.10/CommonCrypto-60061/test/util/ |
H A D | testutil.h | 31 static inline byteBuffer mallocDigestByteBuffer(CCDigestAlgorithm alg) { argument 32 return mallocByteBuffer(CCDigestGetOutputSize(alg));
|
/macosx-10.10/OpenSSL098-52/src/crypto/pkcs7/ |
H A D | pk7_attr.c | 114 X509_ALGOR *alg; local 116 if(!(alg = X509_ALGOR_new())) { 120 ASN1_OBJECT_free(alg->algorithm); 121 alg->algorithm = OBJ_nid2obj (nid); 124 if(!(alg->parameter = ASN1_TYPE_new())) { 136 alg->parameter->value.integer = nbit; 137 alg->parameter->type = V_ASN1_INTEGER; 139 sk_X509_ALGOR_push (sk, alg);
|
/macosx-10.10/Security-57031.1.35/Security/include/security_cdsa_client/ |
H A D | signclient.h | 38 SigningContext(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS signOnly = CSSM_ALGID_NONE) argument 39 : Context(csp, alg), mSignOnly(signOnly) { } 45 void signOnlyAlgorithm(CSSM_ALGORITHMS alg) { mSignOnly = alg; } argument 57 Sign(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS signOnly = CSSM_ALGID_NONE) argument 58 : SigningContext(csp, alg, signOnly) { } 75 Verify(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS verifyOnly = CSSM_ALGID_NONE) argument 76 : SigningContext(csp, alg, verifyOnly) { }
|
/macosx-10.10/Security-57031.1.35/Security/libsecurity_cdsa_client/lib/ |
H A D | signclient.h | 38 SigningContext(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS signOnly = CSSM_ALGID_NONE) argument 39 : Context(csp, alg), mSignOnly(signOnly) { } 45 void signOnlyAlgorithm(CSSM_ALGORITHMS alg) { mSignOnly = alg; } argument 57 Sign(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS signOnly = CSSM_ALGID_NONE) argument 58 : SigningContext(csp, alg, signOnly) { } 75 Verify(const CSP &csp, CSSM_ALGORITHMS alg, CSSM_ALGORITHMS verifyOnly = CSSM_ALGID_NONE) argument 76 : SigningContext(csp, alg, verifyOnly) { }
|
/macosx-10.10/ruby-106/ruby/sample/openssl/ |
H A D | cipher.rb | 4 def crypt_by_password(alg, pass, salt, text) 6 puts %(cipher alg: "#{alg}") 13 enc = OpenSSL::Cipher::Cipher.new(alg) 22 dec = OpenSSL::Cipher::Cipher.new(alg) 49 alg = ARGV.shift || ciphers.first 54 crypt_by_password(alg, pass, salt, text)
|