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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#![deny(broken_intra_doc_links)]
use std::sync::Once;
use tink_core::registry::register_key_manager;
mod aead_factory;
pub use aead_factory::*;
mod aead_key_templates;
pub use aead_key_templates::*;
mod aes_ctr_hmac_aead_key_manager;
pub use aes_ctr_hmac_aead_key_manager::*;
mod aes_gcm_key_manager;
pub use aes_gcm_key_manager::*;
mod aes_gcm_siv_key_manager;
pub use aes_gcm_siv_key_manager::*;
mod chacha20poly1305_key_manager;
pub use chacha20poly1305_key_manager::*;
mod kms_envelope_aead;
pub use kms_envelope_aead::*;
mod kms_envelope_aead_key_manager;
pub use kms_envelope_aead_key_manager::*;
mod xchacha20poly1305_key_manager;
pub use xchacha20poly1305_key_manager::*;
pub mod subtle;
pub const UPSTREAM_VERSION: &str = "1.5.0";
static INIT: Once = Once::new();
pub fn init() {
INIT.call_once(|| {
register_key_manager(std::sync::Arc::new(AesCtrHmacAeadKeyManager::default()))
.expect("tink_aead::init() failed");
register_key_manager(std::sync::Arc::new(AesGcmKeyManager::default()))
.expect("tink_aead::init() failed");
register_key_manager(std::sync::Arc::new(AesGcmSivKeyManager::default()))
.expect("tink_aead::init() failed");
register_key_manager(std::sync::Arc::new(ChaCha20Poly1305KeyManager::default()))
.expect("tink_aead::init() failed");
register_key_manager(std::sync::Arc::new(XChaCha20Poly1305KeyManager::default()))
.expect("tink_aead::init() failed");
register_key_manager(std::sync::Arc::new(KmsEnvelopeAeadKeyManager::default()))
.expect("tink_aead::init() failed");
tink_core::registry::register_template_generator("AES128_GCM", aes128_gcm_key_template);
tink_core::registry::register_template_generator("AES256_GCM", aes256_gcm_key_template);
tink_core::registry::register_template_generator(
"AES128_GCM_SIV",
aes128_gcm_siv_key_template,
);
tink_core::registry::register_template_generator(
"AES256_GCM_SIV",
aes256_gcm_siv_key_template,
);
tink_core::registry::register_template_generator(
"AES128_CTR_HMAC_SHA256",
aes128_ctr_hmac_sha256_key_template,
);
tink_core::registry::register_template_generator(
"AES256_CTR_HMAC_SHA256",
aes256_ctr_hmac_sha256_key_template,
);
tink_core::registry::register_template_generator(
"CHACHA20_POLY1305",
cha_cha20_poly1305_key_template,
);
tink_core::registry::register_template_generator(
"XCHACHA20_POLY1305",
x_cha_cha20_poly1305_key_template,
);
});
}