Lines Matching refs:alg
51 mDNSexport mStatus CryptoAlgInit(mDNSu8 alg, AlgFuncs *func)
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 %d not supported", alg);
67 CryptoAlgFuncs[alg] = func;
71 mDNSexport mStatus EncAlgInit(mDNSu8 alg, AlgFuncs *func)
73 if (alg >= ENC_ALG_MAX)
75 LogMsg("EncAlgInit: alg %d exceeds bounds", alg);
81 if (alg != ENC_BASE32 && alg != ENC_BASE64)
83 LogMsg("EncAlgInit: alg %d not supported", alg);
87 EncAlgFuncs[alg] = func;
91 mDNSexport AlgContext *AlgCreate(AlgType type, mDNSu8 alg)
98 if (alg >= CRYPTO_ALG_MAX) return mDNSNULL;
99 func = CryptoAlgFuncs[alg];
103 if (alg >= DIGEST_TYPE_MAX) return mDNSNULL;
104 func = DigestAlgFuncs[alg];
108 if (alg >= ENC_ALG_MAX) return mDNSNULL;
109 func = EncAlgFuncs[alg];
124 // Create expects ctx->alg to be initialized
125 ctx->alg = alg;
142 func = CryptoAlgFuncs[ctx->alg];
144 func = DigestAlgFuncs[ctx->alg];
146 func = EncAlgFuncs[ctx->alg];
167 func = CryptoAlgFuncs[ctx->alg];
169 func = DigestAlgFuncs[ctx->alg];
171 func = EncAlgFuncs[ctx->alg];
191 func = CryptoAlgFuncs[ctx->alg];
193 func = DigestAlgFuncs[ctx->alg];
195 func = EncAlgFuncs[ctx->alg];
215 func = CryptoAlgFuncs[ctx->alg];
217 func = DigestAlgFuncs[ctx->alg];
219 func = EncAlgFuncs[ctx->alg];
239 func = CryptoAlgFuncs[ctx->alg];
241 func = DigestAlgFuncs[ctx->alg];
243 func = EncAlgFuncs[ctx->alg];
263 func = CryptoAlgFuncs[ctx->alg];
265 func = DigestAlgFuncs[ctx->alg];
267 func = EncAlgFuncs[ctx->alg];