Generic Instance Method

withUnsafeBytes(_:)

Invokes the given closure with a buffer pointer covering the raw bytes of the digest.

Declaration

func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R

Parameters

body

A closure that takes a raw buffer pointer to the bytes of the digest and returns the digest.

Return Value

The digest, as returned from the body closure.

Relationships

From Protocol

See Also

Accessing Underlying Storage

func withContiguousStorageIfAvailable<R>((UnsafeBufferPointer<UInt8>) -> R) -> R?

Call body(p), where p is a pointer to the collection’s contiguous storage. If no such storage exists, it is first created. If the collection does not support an internal representation in a form of contiguous storage, body is not called and nil is returned.