Add Cipher.embedsDigest to signal digest embedding

Currently GCM ciphers do.
This commit is contained in:
Davide De Rosa 2018-09-04 15:48:57 +02:00
parent be97972f18
commit e121555f82
1 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,11 @@ extension SessionProxy {
/// AES encryption with 256-bit key size and GCM. /// AES encryption with 256-bit key size and GCM.
case aes256gcm = "AES-256-GCM" case aes256gcm = "AES-256-GCM"
/// Digest should be ignored when this is `true`.
public var embedsDigest: Bool {
return rawValue.hasSuffix("-GCM")
}
} }
/// The available message digest algorithms. /// The available message digest algorithms.