Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension Data {
return Data((withUnsafeBytes { byte -> [UInt8] in
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))

CC_MD5(byte.baseAddress, CC_LONG(count), &digest)
CC_SHA256(byte.baseAddress, CC_LONG(count), &digest)

return digest
})).base64EncodedString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class CommitPartUploadOperation: BaseOperation<HTTPURLResponse> {
class CommitPartUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
// MARK: - Private Properties

private let descriptor: UploadDescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class CompleteUploadOperation: BaseOperation<JSONResponse> {
class CompleteUploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
// MARK: - Private Properties

private let partsAndEtags: [Int: String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class StartUploadOperation: BaseOperation<UploadDescriptor> {
class StartUploadOperation: BaseOperation<UploadDescriptor>, @unchecked Sendable {
// MARK: - Private Properties

private let config: Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse> {
class SubmitChunkUploadOperation: BaseOperation<HTTPURLResponse>, @unchecked Sendable {
// MARK: - Internal Properties

// Part offset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
class SubmitPartIntelligentUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
// MARK: - Internal Properties

let number: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation {
class SubmitPartRegularUploadOperation: BaseOperation<HTTPURLResponse>, SubmitPartUploadOperation, @unchecked Sendable {
// MARK: - Internal Properties

let number: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class SubmitPartsUploadOperation: BaseOperation<[Int: String]> {
class SubmitPartsUploadOperation: BaseOperation<[Int: String]>, @unchecked Sendable {
// MARK: - Internal Properties

let descriptor: UploadDescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

class UploadOperation: BaseOperation<JSONResponse> {
class UploadOperation: BaseOperation<JSONResponse>, @unchecked Sendable {
// MARK: - Internal Properties

private(set) lazy var progress: Progress = {
Expand Down
4 changes: 2 additions & 2 deletions Sources/FilestackSDK/Public/Operations/BaseOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Foundation
/// - An executing operation will return `isExecuting` true.
/// - A finished operation will return `isFinished` true.
/// - A cancelled operation will return `isCancelled` true.
open class BaseOperation<Success>: Operation {
open class BaseOperation<Success>: Operation, @unchecked Sendable {
public typealias Result = Swift.Result<Success, Error>

// MARK: - Private Properties
Expand Down Expand Up @@ -81,7 +81,7 @@ open class BaseOperation<Success>: Operation {

extension BaseOperation {
/// Returns the result of operation.
open private(set) var result: Result {
public private(set) var result: Result {
get { lockQueue.sync { _result } }
set { lockQueue.sync { _result = newValue } }
}
Expand Down