ECError

public struct ECError : Error, Equatable

A struct representing the different errors that can be thrown by BlueECC.

  • A human readable description of the error.

    Declaration

    Swift

    public let localizedDescription: String
  • Error thrown when an invalid PEM String used to initialize a key.

    Declaration

    Swift

    public static let invalidPEMString: ECError
  • Error thrown when the PEM header is not recognized.

    Declaration

    Swift

    public static let unknownPEMHeader: ECError
  • Error thrown when a String fails to be Base64 encoded.

    Declaration

    Swift

    public static let failedBase64Encoding: ECError
  • Error thrown when the ASN1 data could not be decoded to the expected structure.

    Declaration

    Swift

    public static let failedASN1Decoding: ECError
  • Error thrown when the key’s object identifier is for a curve that is not supported.

    Declaration

    Swift

    public static let unsupportedCurve: ECError
  • Error thrown when the key could not be converted to a native key (SecKey for Apple, EC_KEY for linux).

    Declaration

    Swift

    public static let failedNativeKeyCreation: ECError
  • Error thrown when the encryption envelope fails to initialize.

    Declaration

    Swift

    public static let failedEvpInit: ECError
  • Error thrown when the signing algorithm could not create the signature.

    Declaration

    Swift

    public static let failedSigningAlgorithm: ECError
  • Error thrown when the provided R and S Data was not a valid length. They must be the same length and either 32, 48 or 66 bytes (depending on the curve used).

    Declaration

    Swift

    public static let invalidRSLength: ECError
  • Error thrown when the encryption algorithm could not encrypt the plaintext.

    Declaration

    Swift

    public static let failedEncryptionAlgorithm: ECError
  • Error thrown when the decryption algorithm could not decrypt the encrypted Data.

    Declaration

    Swift

    public static let failedDecryptionAlgorithm: ECError
  • Error thrown when the Data could not be decoded into a UTF8 String.

    Declaration

    Swift

    public static let failedUTF8Decoding: ECError
  • Checks if ECSigningErrors are equal, required for Equatable protocol.

    Declaration

    Swift

    public static func == (lhs: ECError, rhs: ECError) -> Bool