diff --git a/util/unpadded_base64.go b/util/unpadded_base64.go new file mode 100644 index 00000000..1ef1a576 --- /dev/null +++ b/util/unpadded_base64.go @@ -0,0 +1,13 @@ +package util + +import ( + "encoding/base64" +) + +func DecodeUnpaddedBase64String(val string) ([]byte, error) { + return base64.RawStdEncoding.DecodeString(val) +} + +func EncodeUnpaddedBase64ToString(val []byte) string { + return base64.RawStdEncoding.EncodeToString(val) +}