Skip to content

Commit

Permalink
Chunk Size
Browse files Browse the repository at this point in the history
  • Loading branch information
consuelita committed Dec 28, 2018
1 parent 49c78ae commit 3d4aa19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/ReplicantSwift/Polish/PolishController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public struct PolishController
}

/// This is the format needed to send the key to the server.
public func generateAndEncryptPaddedKeyData(fromKey key: SecKey, withChunkSize chunkSize: Int, usingServerKey serverKey: SecKey) -> Data?
public func generateAndEncryptPaddedKeyData(fromKey key: SecKey, withChunkSize chunkSize: UInt16, usingServerKey serverKey: SecKey) -> Data?
{
var error: Unmanaged<CFError>?
var newKeyData: Data
Expand Down Expand Up @@ -247,9 +247,9 @@ public struct PolishController
return decryptedText
}

func getKeyPadding(chunkSize: Int) -> Data?
func getKeyPadding(chunkSize: UInt16) -> Data?
{
let paddingSize = chunkSize - (keySize + aesOverheadSize)
let paddingSize = Int(chunkSize) - (keySize + aesOverheadSize)
if paddingSize > 0
{
let bytes = [UInt8](repeating: 0, count: paddingSize)
Expand Down

0 comments on commit 3d4aa19

Please sign in to comment.