<!--
{
  "documentType" : "article",
  "framework" : "Security",
  "identifier" : "/documentation/Security/security-transforms",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Security Transforms"
}
-->

# Security Transforms

Perform cryptographic functions like encoding, encryption, signing, and signature verification.

## Discussion

You use security transforms to assemble a chain of security-related operations that you apply to a stream of data in macOS.

## Topics

### Transforms

[`SecTransformCreateReadTransformWithReadStream(_:)`](/documentation/Security/SecTransformCreateReadTransformWithReadStream(_:))

Creates a read transform from a read stream reference.

[`SecTransform`](/documentation/Security/SecTransform)

A Core Foundation type that represents a security transform.

[`SecTransformGetTypeID()`](/documentation/Security/SecTransformGetTypeID())

Returns the unique identifier of the opaque type to which a security transform object belongs.

### Encoding

[`SecEncodeTransformCreate(_:_:)`](/documentation/Security/SecEncodeTransformCreate(_:_:))

Creates an encode transform object.

[`SecDecodeTransformCreate(_:_:)`](/documentation/Security/SecDecodeTransformCreate(_:_:))

Creates a decode transform object.

### Encrypting

[`SecEncryptTransformCreate(_:_:)`](/documentation/Security/SecEncryptTransformCreate(_:_:))

Creates an encryption transform object.

[`SecDecryptTransformCreate(_:_:)`](/documentation/Security/SecDecryptTransformCreate(_:_:))

Creates a decryption transform object.

[`SecEncryptTransformGetTypeID()`](/documentation/Security/SecEncryptTransformGetTypeID())

Returns the unique identifier of the opaque type to which an encryption transform belongs.

[`SecDecryptTransformGetTypeID()`](/documentation/Security/SecDecryptTransformGetTypeID())

Returns the unique identifier of the opaque type to which a decryption transform belongs.

### Signing

[`SecSignTransformCreate(_:_:)`](/documentation/Security/SecSignTransformCreate(_:_:))

Creates a signing transform object.

[`SecVerifyTransformCreate(_:_:_:)`](/documentation/Security/SecVerifyTransformCreate(_:_:_:))

Creates a verify transform object.

[`SecDigestTransformCreate(_:_:_:)`](/documentation/Security/SecDigestTransformCreate(_:_:_:))

Creates a digest transform object.

[`SecDigestTransformGetTypeID()`](/documentation/Security/SecDigestTransformGetTypeID())

Returns the unique identifier of the opaque type to which a digest transform belongs.

### Custom Transforms

[`SecTransformCreate(_:_:)`](/documentation/Security/SecTransformCreate(_:_:))

Creates a transform computation object.

[`SecTransformRegister(_:_:_:)`](/documentation/Security/SecTransformRegister(_:_:_:))

Registers a custom transform.

[`SecTransformCreateFP`](/documentation/Security/SecTransformCreateFP)

A pointer to a function that creates a new instance of a custom transform.

[`SecTransformInstanceBlock`](/documentation/Security/SecTransformInstanceBlock)

A block that you return from a transform creation function.

[`SecTransformImplementationRef`](/documentation/Security/SecTransformImplementationRef)

An opaque pointer to a block that implements an instance of a transform.

### Transform Groups

[`SecTransformCreateGroupTransform()`](/documentation/Security/SecTransformCreateGroupTransform())

Creates an object that acts as a container for a set of connected transforms.

[`SecTransformFindByName(_:_:)`](/documentation/Security/SecTransformFindByName(_:_:))

Finds a member of a transform group by its name.

[`SecGroupTransform`](/documentation/Security/SecGroupTransform)

A Core Foundation type that represents a container holding a group of transforms.

[`SecGroupTransformGetTypeID()`](/documentation/Security/SecGroupTransformGetTypeID())

Returns the Core Foundation type ID for a transform group container.

### Transform Characteristics

[`SecTransformSetAttribute(_:_:_:_:)`](/documentation/Security/SecTransformSetAttribute(_:_:_:_:))

Sets a static value for an attribute in a transform.

[`SecTransformGetAttribute(_:_:)`](/documentation/Security/SecTransformGetAttribute(_:_:))

Gets the current value of a transform attribute.

[`SecTransformCustomSetAttribute(_:_:_:_:)`](/documentation/Security/SecTransformCustomSetAttribute(_:_:_:_:))

Sets an attribute value on a custom transform.

[`SecTransformCustomGetAttribute(_:_:_:)`](/documentation/Security/SecTransformCustomGetAttribute(_:_:_:))

Gets an attribute value from a custom transform.

[`SecTranformCustomGetAttribute`](/documentation/Security/SecTranformCustomGetAttribute)

Gets an attribute value from a custom transform.

[`SecTransformPushbackAttribute(_:_:_:)`](/documentation/Security/SecTransformPushbackAttribute(_:_:_:))

Pushes a single value back for a specific attribute.

[Transform Attributes](/documentation/Security/transform-attributes)

Specify the attributes of a transform.

[`SecTransformAttribute`](/documentation/Security/SecTransformAttribute)

A direct reference to a security transform attribute.

[`SecTransformStringOrAttribute`](/documentation/Security/SecTransformStringOrAttribute)

A type that may be either a string or an attribute reference.

[`SecTransformMetaAttributeType`](/documentation/Security/SecTransformMetaAttributeType)

The keys that describe the metadata attributes of transform attributes.

### Actions

[`SecTransformSetDataAction(_:_:_:)`](/documentation/Security/SecTransformSetDataAction(_:_:_:))

Changes the way a custom transform processes data.

[`SecTransformSetAttributeAction(_:_:_:_:)`](/documentation/Security/SecTransformSetAttributeAction(_:_:_:_:))

Requests a callback when an attribute is set.

[`SecTransformSetTransformAction(_:_:_:)`](/documentation/Security/SecTransformSetTransformAction(_:_:_:))

Changes the way that a transform deals with transform lifecycle behaviors.

[`SecTransformActionBlock`](/documentation/Security/SecTransformActionBlock)

A block that overrides the default behavior of a custom transform.

[`SecTransformAttributeActionBlock`](/documentation/Security/SecTransformAttributeActionBlock)

A block used to override the default attribute handling for when an attribute is set.

[`SecTransformDataBlock`](/documentation/Security/SecTransformDataBlock)

A block used to override the default data handling for a transform.

[Actions](/documentation/Security/actions)

Use actions to trigger particular behaviors.

### Piping

[`SecTransformConnectTransforms(_:_:_:_:_:_:)`](/documentation/Security/SecTransformConnectTransforms(_:_:_:_:_:_:))

Chains transforms together.

### Execution

[`SecTransformExecute(_:_:)`](/documentation/Security/SecTransformExecute(_:_:))

Executes a transform or transform group synchronously.

[`SecTransformExecuteAsync(_:_:_:)`](/documentation/Security/SecTransformExecuteAsync(_:_:_:))

Executes transform or transform group asynchronously.

[`SecTransformNoData()`](/documentation/Security/SecTransformNoData())

Returns an object from inside a ProcessData override that says that although no data is being returned the transform is still active and awaiting data.

[`SecMessageBlock`](/documentation/Security/SecMessageBlock)

A block that delivers messages during asynchronous operations.

### Import and Export

[`SecTransformCopyExternalRepresentation(_:)`](/documentation/Security/SecTransformCopyExternalRepresentation(_:))

Creates a dictionary that contains enough information to be able to recreate a transform.

[`SecTransformCreateFromExternalRepresentation(_:_:)`](/documentation/Security/SecTransformCreateFromExternalRepresentation(_:_:))

Creates a transform instance from a dictionary of parameters.

### Reporting Errors

[`kSecTransformErrorDomain`](/documentation/Security/kSecTransformErrorDomain)

The domain of any error object created by a transform on failure.

[Security Transform Error Codes](/documentation/Security/security-transform-error-codes)

Recognize the error codes used in error objects created by a transform on failure.

[`kSecTransformPreviousErrorKey`](/documentation/Security/kSecTransformPreviousErrorKey)

The key in an error’s `userInfo` dictionary whose value specifies the previous error when multiple errors occur during transform evaluation.

[`kSecTransformAbortOriginatorKey`](/documentation/Security/kSecTransformAbortOriginatorKey)

The key in an error’s `userInfo` dictionary whose value indicates the transform that caused the chain to abort.

## See Also

  [Security Transforms Programming Guide](https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecTransformPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010801)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)