download

package module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

See NIST SP 800-38A, pp 08-09

Index

Constants

View Source
const (
	// APIUrl is the deezer API
	APIUrl = "http://www.deezer.com/ajax/gw-light.php"
	// LoginURL is the API for deezer login
	LoginURL = "https://www.deezer.com/ajax/action.php"
	// deezer domain for cookie check
	Domain = "https://www.deezer.com"
)

Variables

This section is empty.

Functions

func BFDecrypt

func BFDecrypt(buf []byte, bfKey string) ([]byte, error)

BFDecrypt is the blowfish decrpytion

func Download

func Download(id string, usertoken string) *bytes.Buffer

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

NewECBDecrypter is used to decrypt the encrypted media

func NewECBEncrypter

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

NewECBEncrypter is the encrypter used by deezer

func Pad

func Pad(src []byte) []byte

Pad is to pad the ciphertext so that it becomes the multiple of 8

Types

type Data

type Data struct {
	DATA *TrackData `json:"DATA"`
}

Data Struct for getting track's json data

type DeezStruct

type DeezStruct struct {
	Error   []string    `json:"error,omitempty"`
	Results *ResultList `json:"results,omitempty"`
}

DeezStruct Struct for Json Data for Login

type DeezTrack

type DeezTrack struct {
	Error   []string `json:"error,omitempty"`
	Results *Data    `json:"results,omitempty"`
}

DeezTrack is Entry Point of the json Data

type OnError

type OnError struct {
	Error   error
	Message string
}

OnError Includes both the error msg and the error itself

type ResultList

type ResultList struct {
	DeezToken      string `json:"checkForm,omitempty"`
	CheckFormLogin string `json:"checkFormLogin,omitempty"`
}

ResultList The json struct for getting information for login

type TrackData

type TrackData struct {
	ID           json.Number `json:"SNG_ID"`
	MD5Origin    string      `json:"MD5_ORIGIN"`
	FileSize320  json.Number `json:"FILESIZE_MP3_320"`
	FileSize256  json.Number `json:"FILESIZE_MP3_256"`
	FileSize128  json.Number `json:"FILESIZE_MP3_128"`
	MediaVersion json.Number `json:"MEDIA_VERSION"`
	SngTitle     string      `json:"SNG_TITLE"`
	ArtName      string      `json:"ART_NAME"`
}

TrackData Json struct for getting the returned json data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL