Skip to content

Commit

Permalink
[swift] chore: var -> let
Browse files Browse the repository at this point in the history
  • Loading branch information
yretenai committed Dec 3, 2024
1 parent f24cf81 commit 8240602
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion swift/Sources/Myna/Transforms/CBCTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct CBCTransform: BlockCipherTransform {

var result = Data(capacity: data.count.align(into: algorithm.blockSize))
var blocks = data.chunks(ofCount: algorithm.blockSize)[...] // cast to slice.
var finalBlock: Data
let finalBlock: Data
if data.count % algorithm.blockSize == 0 {
finalBlock = try padding.pad(data: Data(), into: algorithm.blockSize)
} else {
Expand Down
2 changes: 1 addition & 1 deletion swift/Sources/Myna/Transforms/ECBTransform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct ECBTransform: BlockCipherTransform {

var result = Data(capacity: data.count.align(into: algorithm.blockSize))
var blocks = data.chunks(ofCount: algorithm.blockSize)[...] // cast to slice.
var finalBlock: Data
let finalBlock: Data
if data.count % algorithm.blockSize == 0 {
finalBlock = try padding.pad(data: Data(), into: algorithm.blockSize)
} else {
Expand Down

0 comments on commit 8240602

Please sign in to comment.