예제 #1
0
 protected internal static void EstablishMasterSecret(TlsContext context, TlsKeyExchange keyExchange)
 {
     byte[] array = keyExchange.GeneratePremasterSecret();
     try
     {
         context.SecurityParameters.masterSecret = TlsUtilities.CalculateMasterSecret(context, array);
     }
     finally
     {
         if (array != null)
         {
             Arrays.Fill(array, 0);
         }
     }
 }