Transform Attributes

Specify the attributes of a transform.

Overview

Use these keys and values when accessing transform attributes by name, such as with the SecTransformSetAttribute(_:_:_:_:) and SecTransformGetAttribute(_:_:) functions. You can also use some of the values directly in certain function calls, such as when you create a encode transform with the SecEncodeTransformCreate(_:_:) function and give it an encodeType parameter to seed the kSecEncodeTypeAttribute attribute.

Topics

Encode and Decode Keys

let kSecEncodeLineLengthAttribute: CFString

The length of encoded Base32 or Base64 lines.

let kSecEncodeTypeAttribute: CFString

The encoding used by an encode transform.

let kSecDecodeTypeAttribute: CFString

The encoding used by a decode transform.

Digest and Encryption Keys

let kSecDigestHMACKeyAttribute: CFString

The key for HMAC operation.

let kSecInputIsAttributeName: CFString

The type of input to the transform.

let kSecEncryptKey: CFString

The encryption key for the transform.

let kSecIVKey: CFString

The setting for an initialization vector.

let kSecPaddingKey: CFString

The kind of padding to use.

Transform Keys

let kSecTransformDebugAttributeName: CFString

A write stream that should receive debug data.

let kSecKeyAttributeName: CFString

The cryptographic key associated with a transform.

let kSecSignatureAttributeName: CFString

The cryptographic signature associated with a transform.

Encode Types

Values you use with the kSecEncodeTypeAttribute and kSecDecodeTypeAttribute keys.

Digest Types

Values you use with the kSecDigestTypeAttribute key.

let kSecDigestHMACMD5: CFString

An HMAC using the MD5 digest algorithm.

let kSecDigestHMACSHA1: CFString

An HMAC using the SHA1 digest algorithm.

let kSecDigestHMACSHA2: CFString

An HMAC using one of the SHA2 digest algorithms.

Line Lengths

Values you use with the kSecEncodeLineLengthAttribute key.

let kSecLineLength64: CFString

A line length of 64 bytes.

let kSecLineLength76: CFString

A line length of 76 bytes.

Input Types

Values you use with the kSecInputIsAttributeName key.

let kSecInputIsDigest: CFString

The input is a digest of the original data.

let kSecInputIsPlainText: CFString

The input is plain text.

Padding Types

Values you use with the kSecPaddingKey key.

let kSecPaddingNoneKey: CFString

No padding will be used when encrypting or decrypting.

let kSecPaddingOAEPKey: CFString

PKCS7 padding will be used when encrypting or decrypting.

let kSecPaddingPKCS1Key: CFString

PKCS1 padding will be used when encrypting or decrypting.

let kSecPaddingPKCS5Key: CFString

PKCS5 padding will be used when encrypting or decrypting.

let kSecPaddingPKCS7Key: CFString

PKCS7 padding will be used when encrypting or decrypting.

Encryption Modes

Values you use with the kSecEncryptionMode key.

let kSecModeNoneKey: CFString

No mode will be used when encrypting or decrypting.

let kSecModeCBCKey: CFString

CBC mode will be used when encrypting or decrypting.

let kSecModeCFBKey: CFString

CFB mode will be used when encrypting or decrypting.

let kSecModeECBKey: CFString

ECB mode will be used when encrypting or decrypting.

let kSecModeOFBKey: CFString

OFB mode will be used when encrypting or decrypting.