...

Source file src/edge-infra.dev/pkg/lib/crypto/encodings/encodings.go

Documentation: edge-infra.dev/pkg/lib/crypto/encodings

     1  package encodings
     2  
     3  import (
     4  	"encoding/base64"
     5  	"strings"
     6  )
     7  
     8  func GetUpperString(phrase string) string {
     9  	return strings.ToUpper(phrase)
    10  }
    11  
    12  func Base64Encode(data string) string {
    13  	return base64.StdEncoding.EncodeToString([]byte(data))
    14  }
    15  
    16  func Base64Decode(data string) (string, error) {
    17  	decoded, err := base64.StdEncoding.DecodeString(data)
    18  	return string(decoded), err
    19  }
    20  

View as plain text