package oauth

import (
	"crypto/sha256"
	"encoding/base64"
)

func base64URLEncode(b []byte) string {
	return base64.RawURLEncoding.EncodeToString(b)
}

func sha256Sum(input string) ([]byte, error) {
	sum := sha256.Sum256([]byte(input))
	return sum[:], nil
}
