From 4bf7a8e7da2265bf803b8f4585ef4fec09ddb5e2 Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Sat, 19 Jun 2021 19:11:51 +0100 Subject: [PATCH] CLEANUP: Standardised all base 64 encoding to use standard encoding for compatibility. --- salt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt.go b/salt.go index aa58f59..080b0ea 100644 --- a/salt.go +++ b/salt.go @@ -43,7 +43,7 @@ func FromByteArray(bytes []byte) (*Salt, error) { // the Base 64 string into a byte array of length 2 and then unpack the 4 // nibbles from the 2 bytes. func FromBase64(data string) (*Salt, error) { - b, err := base64.RawStdEncoding.DecodeString(data) + b, err := base64.StdEncoding.DecodeString(data) if err != nil { return nil, err } @@ -83,7 +83,7 @@ func (s Salt) ToBase64String() string { // Get the byte array. b := saltAsBytes(s.bytes) // Convert the byte array to a Base64 string. - return base64.RawStdEncoding.EncodeToString(b) + return base64.StdEncoding.EncodeToString(b) } // Get the salt value from a byte array.