aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2017-11-17 23:42:21 -0700
committerJosh Wolfe <thejoshwolfe@gmail.com>2017-11-20 23:26:45 -0700
commita44283b0b2e585d7e15d7c8e6574411b75c12a0a (patch)
treeeb65022cc018de1061d44e030e4ce1287b991041 /src/main.cpp
parent339d48ac1558dcd1977574372becd21f7fc4a075 (diff)
downloadzig-a44283b0b2e585d7e15d7c8e6574411b75c12a0a.tar.gz
zig-a44283b0b2e585d7e15d7c8e6574411b75c12a0a.zip
rework std.base64 api
* rename decode to decodeExactUnsafe. * add decodeExact, which checks for invalid chars and padding. * add decodeWithIgnore, which also allows ignoring chars. * alphabets are supplied to the decoders with their char-to-index mapping already built, which enables it to be done at comptime. * all decode/encode apis except decodeWithIgnore require dest to be the exactly correct length. This is calculated by a calc function corresponding to each api. These apis no longer return the dest parameter. * for decodeWithIgnore, an exact size cannot be known a priori. Instead, a calc function gives an upperbound, and a runtime error is returned in case of overflow. decodeWithIgnore returns the number of bytes written to dest. closes #611
Diffstat (limited to 'src/main.cpp')
0 files changed, 0 insertions, 0 deletions