Home | History | Annotate | Download | only in cups

Lines Matching full:hash

28  * 'cupsHashData()' - Perform a hash function on the given data.
31 * hash algorithms for the "job-password-encryption" attribute, including
34 * The "hash" argument points to a buffer of "hashsize" bytes and should be at
37 * The returned hash is binary data.
42 ssize_t /* O - Size of hash or -1 on error */
44 const void *data, /* I - Data to hash */
45 size_t datalen, /* I - Length of data to hash */
46 unsigned char *hash, /* I - Hash buffer */
47 size_t hashsize) /* I - Size of hash buffer */
49 if (!algorithm || !data || datalen == 0 || !hash || hashsize == 0)
69 CC_SHA1_Final(hash, &ctx);
82 CC_SHA224_Final(hash, &ctx);
95 CC_SHA256_Final(hash, &ctx);
108 CC_SHA384_Final(hash, &ctx);
121 CC_SHA512_Final(hash, &ctx);
129 /* SHA-512 hash */
142 memcpy(hash, temp, CC_SHA224_DIGEST_LENGTH);
150 /* SHA-512 hash */
163 memcpy(hash, temp, CC_SHA256_DIGEST_LENGTH);
171 unsigned char temp[64]; /* Temporary hash buffer */
207 memcpy(hash, temp, tempsize);
215 gnutls_hash_fast(alg, data, datalen, hash);
222 * No hash support without CommonCrypto or GNU TLS...
230 * Unknown hash algorithm...
233 _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unknown hash algorithm."), 1);
243 _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1);