1a183f2598041a3f4760051c4a5b6e89c4b8662e
[platform/upstream/krb5.git] / doc / html / _sources / appdev / refs / api / krb5_k_verify_checksum.txt
1 krb5_k_verify_checksum -  Verify a checksum (operates on opaque key). 
2 ======================================================================
3
4 ..
5
6 .. c:function:: krb5_error_code krb5_k_verify_checksum(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data * data, const krb5_checksum * cksum, krb5_boolean * valid)
7
8 ..
9
10
11 :param:
12
13                   **[in]** **context** - Library context
14
15                   **[in]** **key** - Encryption key for a keyed checksum
16
17                   **[in]** **usage** - *key* usage
18
19                   **[in]** **data** - Data to be used to compute a new checksum using *key* to compare *cksum* against
20
21                   **[in]** **cksum** - Checksum to be verified
22
23                   **[out]** **valid** - Non-zero for success, zero for failure
24
25
26 ..
27
28
29 :retval:
30          -   0   Success; otherwise - Kerberos error codes
31
32
33 ..
34
35
36
37
38
39
40
41 This function verifies that *cksum* is a valid checksum for *data* . If the checksum type of *cksum* is a keyed checksum, *key* is used to verify the checksum. If the checksum type in *cksum* is 0 and *key* is not NULL, the mandatory checksum type for *key* will be used. The actual checksum key will be derived from *key* and *usage* if key derivation is specified for the checksum type.
42
43
44
45
46
47
48
49
50
51
52 ..
53
54
55
56
57
58
59 .. note::
60
61          This function is similar to :c:func:`krb5_c_verify_checksum()` , but operates on opaque *key* .
62  
63
64
65