Why is `ivBytes` not publicly accessible on `AES._CBC.IV`?
- Dominant language
- Assembly
- Stars
- 1.7k
- Forks
- 223
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
### Question Checklist
- [x] I'm using the latest version of Swift Crypto (main branch)
- [x] I read the [Contribution Guidelines](https://github.com/apple/swift-crypto/blob/main/CONTRIBUTING.md)
- [x] I searched for [existing GitHub issues](https://github.com/apple/swift-crypto/issues)
### Question Subject
Why `ivBytes` is not a public property on `AES._CBC.IV`?
#### Question Description
I would expect `ivBytes` to be public which would enable me to encode it to an external representation.
There is a workaround for this issue:
```swift
var copy = iv
let ivData = withUnsafeBytes(of: ©) { Data($0) }
```
Contributor guide
Research direction
Start by reviewing the public API for AES._CBC.IV and the issue's existing withUnsafeBytes workaround. Determine whether exposing ivBytes is an appropriate API change and define the expected external representation before implementing or testing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100