summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTLS/TLSv12.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibTLS/TLSv12.h')
-rw-r--r--Userland/Libraries/LibTLS/TLSv12.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Libraries/LibTLS/TLSv12.h b/Userland/Libraries/LibTLS/TLSv12.h
index 23f899ca54..628453d3ef 100644
--- a/Userland/Libraries/LibTLS/TLSv12.h
+++ b/Userland/Libraries/LibTLS/TLSv12.h
@@ -447,6 +447,20 @@ private:
}
}
+ Crypto::Hash::HashKind hmac_hash() const
+ {
+ switch (mac_length()) {
+ case Crypto::Hash::SHA512::DigestSize:
+ return Crypto::Hash::HashKind::SHA512;
+ case Crypto::Hash::SHA384::DigestSize:
+ return Crypto::Hash::HashKind::SHA384;
+ case Crypto::Hash::SHA256::DigestSize:
+ case Crypto::Hash::SHA1::DigestSize:
+ default:
+ return Crypto::Hash::HashKind::SHA256;
+ }
+ }
+
size_t iv_length() const
{
switch (m_context.cipher) {