Skip to content

Commit 04771a8

Browse files
authored
password-hash: remove deprecated methods on Salt* types (#1961)
These methods were deprecated in the v0.5 release
1 parent 079b4ab commit 04771a8

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

password-hash/src/salt.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,6 @@ impl<'a> Salt<'a> {
146146
pub fn len(&self) -> usize {
147147
self.as_str().len()
148148
}
149-
150-
/// Create a [`Salt`] from the given B64-encoded input string, validating
151-
/// [`Salt::MIN_LENGTH`] and [`Salt::MAX_LENGTH`] restrictions.
152-
#[deprecated(since = "0.5.0", note = "use `from_b64` instead")]
153-
pub fn new(input: &'a str) -> Result<Self> {
154-
Self::from_b64(input)
155-
}
156-
157-
/// Attempt to decode a B64-encoded [`Salt`] into bytes, writing the
158-
/// decoded output into the provided buffer, and returning a slice of the
159-
/// portion of the buffer containing the decoded result on success.
160-
#[deprecated(since = "0.5.0", note = "use `decode_b64` instead")]
161-
pub fn b64_decode<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [u8]> {
162-
self.decode_b64(buf)
163-
}
164149
}
165150

166151
impl AsRef<str> for Salt<'_> {
@@ -268,27 +253,6 @@ impl SaltString {
268253
pub fn len(&self) -> usize {
269254
self.as_str().len()
270255
}
271-
272-
/// Create a new [`SaltString`] from the given B64-encoded input string,
273-
/// validating [`Salt::MIN_LENGTH`] and [`Salt::MAX_LENGTH`] restrictions.
274-
#[deprecated(since = "0.5.0", note = "use `from_b64` instead")]
275-
pub fn new(s: &str) -> Result<Self> {
276-
Self::from_b64(s)
277-
}
278-
279-
/// Decode this [`SaltString`] from B64 into the provided output buffer.
280-
#[deprecated(since = "0.5.0", note = "use `decode_b64` instead")]
281-
pub fn b64_decode<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]> {
282-
self.decode_b64(buf)
283-
}
284-
285-
/// Encode the given byte slice as B64 into a new [`SaltString`].
286-
///
287-
/// Returns `Error` if the slice is too long.
288-
#[deprecated(since = "0.5.0", note = "use `encode_b64` instead")]
289-
pub fn b64_encode(input: &[u8]) -> Result<Self> {
290-
Self::encode_b64(input)
291-
}
292256
}
293257

294258
impl AsRef<str> for SaltString {

0 commit comments

Comments
 (0)