]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/BaseLib: Add Base64Encode() and Base64Decode()
authorMike Turner <miketur@microsoft.com>
Fri, 28 Dec 2018 08:00:02 +0000 (16:00 +0800)
committerLiming Gao <liming.gao@intel.com>
Sat, 2 Feb 2019 13:41:11 +0000 (21:41 +0800)
commit1f7af69d10fa3c88e996d38179d5f985f6c7dfe5
treea4c0deb98925e7ee02cab05754b12f6e96d044fe
parent97c8f5b9e7d3136b6051a05cf056ce5ca9e79893
MdePkg/BaseLib: Add Base64Encode() and Base64Decode()

Introduce public functions Base64Encode and Base64Decode.
https://bugzilla.tianocore.org/show_bug.cgi?id=1370

v2:1.Remove some white space.
   2.Add unit test with test vectors in RFC 4648.
     https://github.com/shenglei10/edk2/tree/encode_test
     https://github.com/shenglei10/edk2/tree/decode_test

v3:1.Align white space.
   2.Update comments of Base64Encode and Base64Decode.
   3.Change the use of macro RETURN_DEVICE_ERROR to
     RETURN_INVALID_PARAMETER in string.c.

v4:Change parameters' names.

v5:1.Update usage of variables.
   2.Remove debug message in Base64Decode().

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/String.c