Files
Morgan Pretty 0cc37365ba Merge branch 'feature/profile-pic-reupload-changes' into feature/libsession-message-wrapping
# Conflicts:
#	SessionMessagingKit/Jobs/AttachmentUploadJob.swift
#	SessionMessagingKit/Jobs/MessageSendJob.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+Groups.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionUtilitiesKit/Crypto/CryptoError.swift
2025-10-28 15:25:29 +11:00

40 lines
1.7 KiB
Swift

// Copyright © 2023 Rangeproof Pty Ltd. All rights reserved.
//
// stringlint:disable
import Foundation
public enum CryptoError: Error, CustomStringConvertible {
case invalidSeed
case invalidKey
case invalidPublicKey
case keyGenerationFailed
case randomGenerationFailed
case signatureGenerationFailed
case signatureVerificationFailed
case encryptionFailed
case decryptionFailed
case failedToGenerateOutput
case missingUserSecretKey
case invalidAuthentication
case invalidBase64EncodedData
public var description: String {
switch self {
case .invalidSeed: return "CryptoError: Invalid seed"
case .invalidKey: return "CryptoError: Invalid key"
case .invalidPublicKey: return "CryptoError: Invalid public key"
case .keyGenerationFailed: return "CryptoError: Key generation failed"
case .randomGenerationFailed: return "CryptoError: Random generation failed"
case .signatureGenerationFailed: return "CryptoError: Signature generation failed"
case .signatureVerificationFailed: return "CryptoError: Signature verification failed"
case .encryptionFailed: return "CryptoError: Encryption failed"
case .decryptionFailed: return "CryptoError: Decryption failed"
case .failedToGenerateOutput: return "CryptoError: Failed to generate output"
case .missingUserSecretKey: return "CryptoError: Missing user secret key"
case .invalidAuthentication: return "CryptoError: Invalid authentication"
case .invalidBase64EncodedData: return "CryptoError: Invalid Base64 encoded data"
}
}
}