---
title: "SecKeyGetBlockSize(_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeygetblocksize(_:)"
---

# SecKeyGetBlockSize(_:)

Gets the block length associated with a cryptographic key.

## Declaration

```swift
func SecKeyGetBlockSize(_ key: SecKey) -> Int
```

## Parameters

- `key`: The key for which you want the block length.

## Mentioned in

Using Keys for Encryption

## Return Value

Return Value The block length associated with the key in bytes. If the key is an RSA key, for example, this is the size of the modulus.
