Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/decoder.nr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::defaults::BASE64_PADDING_CHAR;

pub global STANDARD = Base64DecodeBE::new(true);
pub global STANDARD_NO_PAD = Base64DecodeBE::new(false);
pub global URL_SAFE = Base64DecodeBE::base64url(false);
pub global URL_SAFE_WITH_PAD = Base64DecodeBE::base64url(true);
pub global STANDARD: Base64DecodeBE = Base64DecodeBE::new(true);
pub global STANDARD_NO_PAD: Base64DecodeBE = Base64DecodeBE::new(false);
pub global URL_SAFE: Base64DecodeBE = Base64DecodeBE::base64url(false);
pub global URL_SAFE_WITH_PAD: Base64DecodeBE = Base64DecodeBE::base64url(true);

global INVALID_VALUE: u8 = 255;
struct Base64DecodeBE {
Expand Down
8 changes: 4 additions & 4 deletions src/encoder.nr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use super::defaults::BASE64_PADDING_CHAR;

pub global STANDARD = Base64EncodeBE::new(true);
pub global STANDARD_NO_PAD = Base64EncodeBE::new(false);
pub global URL_SAFE = Base64EncodeBE::base64url(false);
pub global URL_SAFE_WITH_PAD = Base64EncodeBE::base64url(true);
pub global STANDARD: Base64EncodeBE = Base64EncodeBE::new(true);
pub global STANDARD_NO_PAD: Base64EncodeBE = Base64EncodeBE::new(false);
pub global URL_SAFE: Base64EncodeBE = Base64EncodeBE::base64url(false);
pub global URL_SAFE_WITH_PAD: Base64EncodeBE = Base64EncodeBE::base64url(true);

struct Base64EncodeBE {
// for some reason, if the lookup table is not defined in a struct, access costs are expensive and ROM tables aren't being used :/
Expand Down