createAtChops method

  1. @visibleForTesting
AtChops createAtChops(
  1. Map<String, String> decryptedAtKeys
)

Creates and returns an an AtChops instance

Implementation

@visibleForTesting
AtChops createAtChops(Map<String, String> decryptedAtKeys) {
  final atEncryptionKeyPair = AtEncryptionKeyPair.create(
      decryptedAtKeys[BackupKeyConstants.ENCRYPTION_PUBLIC_KEY_FROM_FILE]!,
      decryptedAtKeys[BackupKeyConstants.ENCRYPTION_PRIVATE_KEY_FROM_FILE]!);
  final atPkamKeyPair = AtPkamKeyPair.create(
      decryptedAtKeys[BackupKeyConstants.PKAM_PUBLIC_KEY_FROM_KEY_FILE]!,
      decryptedAtKeys[BackupKeyConstants.PKAM_PRIVATE_KEY_FROM_KEY_FILE]!);
  final atChopsKeys = AtChopsKeys.create(atEncryptionKeyPair, atPkamKeyPair);
  final atChops = AtChopsImpl(atChopsKeys);
  return atChops;
}