|
@@ -49,12 +49,12 @@ public protocol FinalizingEncryptModeWorker: CipherModeWorker {
|
|
|
}
|
|
|
|
|
|
public protocol FinalizingDecryptModeWorker: CipherModeWorker {
|
|
|
- // Any final calculations, eg. calculate tag
|
|
|
- // Called after the last block is encrypted
|
|
|
- mutating func finalize(decrypt plaintext: ArraySlice<UInt8>) throws -> ArraySlice<UInt8>
|
|
|
// Called before decryption, hence input is ciphertext.
|
|
|
// ciphertext is either a last block, or a tag (for stream workers)
|
|
|
mutating func willDecryptLast(bytes ciphertext: ArraySlice<UInt8>) throws -> ArraySlice<UInt8>
|
|
|
// Called after decryption, hence input is ciphertext
|
|
|
- mutating func didDecryptLast(block plaintext: ArraySlice<UInt8>) throws -> ArraySlice<UInt8>
|
|
|
+ mutating func didDecryptLast(bytes plaintext: ArraySlice<UInt8>) throws -> ArraySlice<UInt8>
|
|
|
+ // Any final calculations, eg. calculate tag
|
|
|
+ // Called after the last block is encrypted
|
|
|
+ mutating func finalize(decrypt plaintext: ArraySlice<UInt8>) throws -> ArraySlice<UInt8>
|
|
|
}
|