internal static EncryptedFileKey FromApiFileKey(ApiFileKey apiEncryptedFileKey) { EncryptedFileKey encryptedFileKey = new EncryptedFileKey { Key = apiEncryptedFileKey.Key, Iv = apiEncryptedFileKey.Iv, Tag = apiEncryptedFileKey.Tag, Version = apiEncryptedFileKey.Version }; return(encryptedFileKey); }
internal static ApiFileKey ToApiFileKey(EncryptedFileKey encryptedFileKey) { ApiFileKey apiEncryptedFileKey = new ApiFileKey { Key = encryptedFileKey.Key, Iv = encryptedFileKey.Iv, Tag = encryptedFileKey.Tag, Version = encryptedFileKey.Version }; return(apiEncryptedFileKey); }
public void FromApiFileKey() { // ARRANGE EncryptedFileKey expected = FactoryFile.EncryptedFileKey; ApiFileKey param = new ApiFileKey { Iv = expected.Iv, Key = expected.Key, Tag = expected.Tag, Version = expected.Version }; // ACT EncryptedFileKey actual = FileMapper.FromApiFileKey(param); // ASSERT Assert.Equal(expected, actual, new EncryptedFileKeyComparer()); }