Lines Matching refs:pctx
243 static int nss_hash_init(void **pctx, SECOidTag hash_alg)
265 *pctx = ctx;
269 static void nss_hash_final(void **pctx, unsigned char *out, unsigned int len)
271 PK11Context *ctx = *pctx;
277 static int MD5_Init(MD5_CTX *pctx)
279 return nss_hash_init(pctx, SEC_OID_MD5);
282 static void MD5_Update(MD5_CTX *pctx,
286 PK11_DigestOp(*pctx, input, input_len);
289 static void MD5_Final(unsigned char digest[16], MD5_CTX *pctx)
291 nss_hash_final(pctx, digest, 16);
294 static int SHA1_Init(SHA_CTX *pctx)
296 return nss_hash_init(pctx, SEC_OID_SHA1);
299 static void SHA1_Update(SHA_CTX *pctx,
303 PK11_DigestOp(*pctx, input, input_len);
306 static void SHA1_Final(unsigned char digest[20], SHA_CTX *pctx)
308 nss_hash_final(pctx, digest, 20);
311 static int SHA256_Init(SHA256_CTX *pctx)
313 return nss_hash_init(pctx, SEC_OID_SHA256);
316 static void SHA256_Update(SHA256_CTX *pctx,
320 PK11_DigestOp(*pctx, input, input_len);
323 static void SHA256_Final(unsigned char digest[32], SHA256_CTX *pctx)
325 nss_hash_final(pctx, digest, 32);