public void GetPublicRepresentation_Twice_ShouldYieldSameResult() { var key = new byte[32]; var converter = new AesPublicIdentityConverter(key); var first = converter.GetPublicRepresentation(1UL); var second = converter.GetPublicRepresentation(1UL); Assert.Equal(second, first); }
public void TryGetUlong_Twice_ShouldYieldSameResult() { var key = new byte[32]; var converter = new AesPublicIdentityConverter(key); var publicId = converter.GetPublicRepresentation(1UL); var firstSucceeded = converter.TryGetUlong(publicId, out var first); var secondSucceeded = converter.TryGetUlong(publicId, out var second); Assert.True(firstSucceeded); Assert.True(secondSucceeded); Assert.Equal(second, first); }