1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate*;
use *;
/// Key derivation function
///
/// Produces a KDF output of the specified size when run over the
/// provided secret, salt, and label inputs
///
/// # Examples
/// ```
/// let salt = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
/// let label = vec![0x42, 0x6F, 0x62];
/// let secret = vec![0x4E, 0x6F, 0x74, 0x20, 0x54, 0x65, 0x6C, 0x6C, 0x69, 0x6E, 0x67];
/// let v = botan::kdf("HKDF(SHA-256)", 23, &secret, &salt, &label).unwrap();
/// assert_eq!(v.len(), 23);
/// ```