<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/Insecure/SHA1/update(bufferPointer:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit8InsecureO4SHA1V6update13bufferPointerySW_tF"
  },
  "title" : "update(bufferPointer:)"
}
-->

# update(bufferPointer:)

Incrementally updates the hash function with the contents of the
buffer.

```
mutating func update(bufferPointer: UnsafeRawBufferPointer)
```

## Parameters

`bufferPointer`

A pointer to the next block of data for the ongoing
digest calculation.

## Discussion

Call this method one or more times to provide data to the hash
function in blocks. After providing the last block of data, call the
[`finalize()`](/documentation/CryptoKit/Insecure/SHA1/finalize()) method to get the computed digest. Don’t call the
update method again after finalizing the hash function.

> Note: Typically, it’s safer to use an instance of
> <doc://com.apple.documentation/documentation/Foundation/Data>, or
> some other type that conforms to the
> <doc://com.apple.documentation/documentation/Foundation/DataProtocol>,
> to hold your data. When possible, use the ``update(data:)`` method
> instead.

---

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)