From 60ed0983a7013ea8284bf2c577a42df8b2c5f812 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 15 Nov 2022 10:11:13 +0100 Subject: [PATCH] Rename to_bytes() to digest() --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9eb0fa4..d3180c4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -444,7 +444,7 @@ impl KeyAuthorization { /// This can be used for TLS-ALPN-01 challenge responses. /// /// - pub fn to_bytes(&self) -> impl AsRef<[u8]> { + pub fn digest(&self) -> impl AsRef<[u8]> { digest(&SHA256, self.0.as_bytes()) } @@ -452,7 +452,7 @@ impl KeyAuthorization { /// /// This can be used for DNS-01 challenge responses. pub fn dns_value(&self) -> String { - base64::encode_config(self.to_bytes(), URL_SAFE_NO_PAD) + base64::encode_config(self.digest(), URL_SAFE_NO_PAD) } }