Beispiel #1
0
        public void addSenderMessageKey(SenderMessageKey senderMessageKey)
        {
            SenderKeyStateStructure.Types.SenderMessageKey senderMessageKeyStructure =
                SenderKeyStateStructure.Types.SenderMessageKey.CreateBuilder()
                                                        .SetIteration(senderMessageKey.getIteration())
                                                        .SetSeed(ByteString.CopyFrom(senderMessageKey.getSeed()))
                                                        .Build();

            this.senderKeyStateStructure = this.senderKeyStateStructure.ToBuilder()
                                                                       .AddSenderMessageKeys(senderMessageKeyStructure)
                                                                       .Build();
        }
		public void addSenderMessageKey(SenderMessageKey senderMessageKey)
		{
			SenderKeyStateStructure.Types.SenderMessageKey senderMessageKeyStructure =
				SenderKeyStateStructure.Types.SenderMessageKey.CreateBuilder()
														.SetIteration(senderMessageKey.getIteration())
														.SetSeed(ByteString.CopyFrom(senderMessageKey.getSeed()))
														.Build();

			SenderKeyStateStructure.Builder builder = this.senderKeyStateStructure.ToBuilder();
			builder.AddSenderMessageKeys(senderMessageKeyStructure);

			if (builder.SenderMessageKeysList.Count > MAX_MESSAGE_KEYS)
			{
				builder.SenderMessageKeysList.RemoveAt(0);
			}
			this.senderKeyStateStructure = builder.Build();
		}