generated from PlexSheep/rs-base
add parser for all formats #13
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: PlexSheep/numf#13
Loading…
Reference in New Issue
No description provided.
Delete Branch "feat/parse-formats"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs: #5
WIP: feat: add a parser that can be used with clap for all formats except base32 and base64to WIP: add parser for all formatsPlexSheep referenced this pull request2024-05-13 13:21:28 +02:00
@ -216,0 +287,4 @@
Err(anyhow!(e))
}
}
} else if s.starts_with(&Format::Base64.prefix()) {
add functionalits for base64
@ -216,0 +290,4 @@
} else if s.starts_with(&Format::Base64.prefix()) {
let e = "parsing of base64 is not yet implemented".to_string();
Err(anyhow!(e))
} else if s.starts_with(&Format::Base32.prefix()) {
add functionalits for base32
@ -216,0 +238,4 @@
/// let args = Args::parse_from(&["", "-a", "0x10"]);
/// assert_eq!(args.address, 16);
/// ```
pub fn numf_parser(s: &str) -> anyhow::Result<NumberType> {
Make this function generic for all unsigned integer types
@ -216,0 +300,4 @@
None => s,
};
match fast32::base64::RFC4648.decode_str(s) {
Ok(r) => {
implement building the
u128
from a Vec in libpt-bintols and use the dependency for thissee PlexSheep/pt#79
@ -20,2 +20,3 @@
fast32 = "1.0.2"
libpt = { version = "0.5.0", features = ["bintols"]}
libpt = { version = "0.5.1", features = ["bintols"]}
num = "0.4.3"
remove num if it's not needed
yup we need that
@ -216,0 +307,4 @@
};
match fast32::base64::RFC4648.decode_str(s) {
Ok(r) => {
if r.len() > 16 {
use libpt here too!
ok
WIP: add parser for all formatsto add parser for all formats