func checkKeyFormat(apiKey string) error {
	rawKey, err := base64.StdEncoding.DecodeString(apiKey)
	if err != nil {
		return fmt.Errorf("the key could not be base64 decoded: %s", err)
	}
	if len(rawKey) != 32 {
		return fmt.Errorf("the key is not 256 bit")
	}
	return nil
}
// Check that the key is a base64 encoded 32 byte string
Check that the key is a base64 encoded 32 byte string
// Check that the key is a base64 encoded 32 byte string
func checkKeyFormat(apiKey string) error {
	rawKey, err := base64.StdEncoding.DecodeString(apiKey)
	if err != nil {
		return fmt.Errorf("the key could not be base64 decoded: %s", err)
	}
	if len(rawKey) != 32 {
		return fmt.Errorf("the key is not 256 bit")
	}
	return nil
}
func checkKeyFormat ( apiKey string ) error { rawKey , err := base64 . StdEncoding . DecodeString ( apiKey ) if err != nil { return fmt . Errorf ( " " , err ) } if len ( rawKey ) != 32 { return fmt . Errorf ( " " ) } return nil }
Check that the key is a base64 encoded 32 byte string
Check that the key is a base64 encoded 32 byte string