Skip to content

Commit

Permalink
add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops committed Apr 12, 2024
1 parent 3be89c0 commit 6e7d008
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/typeid/internal/Base32.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public class Base32 {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};

/**
* @param src encoded bytes
* @return decoded bytes if valid
*/
public static Optional<byte[]> decode(byte[] src) {
if (src.length != 26) {
return Optional.empty();
Expand Down Expand Up @@ -91,6 +95,10 @@ public static Optional<byte[]> decode(byte[] src) {
});
}

/**
* @param src raw bytes
* @return string is valid
*/
public static Optional<String> encode(byte[] src) {
if (src.length != 16) {
return Optional.empty();
Expand Down

0 comments on commit 6e7d008

Please sign in to comment.