refactor: disambiguate blowfish crypto helper names
This commit is contained in:
@@ -175,7 +175,7 @@ func (c *Client) downloadSong(ctx context.Context, resource deezer.Resource, son
|
||||
fileName := song.GetFileName(c.resourceType, mediaFormat)
|
||||
outputPath := path.Join(outputDir, fileName)
|
||||
|
||||
key := crypto.GetKey(song.ID)
|
||||
key := crypto.GetBlowfishKey(song.ID)
|
||||
if err := c.streamToFile(dlCtx, stream, outputPath, key); err != nil {
|
||||
fileutil.DeleteFile(outputPath)
|
||||
return downloadResult{err: fmt.Errorf("failed to stream to file: %w", err)}
|
||||
@@ -233,7 +233,7 @@ func (c *Client) streamToFile(ctx context.Context, stream io.ReadCloser, outputP
|
||||
}
|
||||
|
||||
if chunk%3 == 0 && totalRead == chunkSize {
|
||||
buffer, err = crypto.Decrypt(buffer, key)
|
||||
buffer, err = crypto.DecryptBlowfish(buffer, key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user