Skip to content

Commit 51a9c51

Browse files
kdumaCopilot
andauthored
Update src/BinaryString.php
Co-authored-by: Copilot <[email protected]>
1 parent 784223b commit 51a9c51

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/BinaryString.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ public static function fromBase64(string $base64): static
4848
return new static(base64_decode($base64, true));
4949
}
5050

51+
/**
52+
* Decodes a Base32-encoded string to a BinaryString instance.
53+
*
54+
* @param string $base32 The Base32-encoded string to decode.
55+
* @param string $alphabet The alphabet used for Base32 encoding. Defaults to Base32::DEFAULT_ALPHABET.
56+
* @return static A new BinaryString instance containing the decoded binary data.
57+
*/
5158
public static function fromBase32(string $base32, string $alphabet = Base32::DEFAULT_ALPHABET): static
5259
{
5360
return new static(Base32::fromBase32($base32, $alphabet));

0 commit comments

Comments
 (0)