CryptoModule.legacyCryptoModule constructor
- @Deprecated('Use CryptoModule.aesCbcCryptoModule for new applications. This factory ' 'encrypts with the legacy cryptor and is retained only for ' 'backward compatibility.')
- CipherKey cipherKey, {
- dynamic defaultCryptoConfiguration = const CryptoConfiguration(),
Creates a CryptoModule that encrypts with the legacy cryptor.
New content is encrypted using the deprecated LegacyCryptor. Prefer CryptoModule.aesCbcCryptoModule, which encrypts with AesCbcCryptor while still decrypting legacy content.
Implementation
@Deprecated(
'Use CryptoModule.aesCbcCryptoModule for new applications. This factory '
'encrypts with the legacy cryptor and is retained only for '
'backward compatibility.')
factory CryptoModule.legacyCryptoModule(CipherKey cipherKey,
{defaultCryptoConfiguration = const CryptoConfiguration()}) {
return CryptoModule(
// ignore: deprecated_member_use_from_same_package
defaultCryptor: LegacyCryptor(cipherKey,
cryptoConfiguration: defaultCryptoConfiguration),
cryptors: <ICryptor>[AesCbcCryptor(cipherKey)]);
}