Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for trimming (0.09 sec)

  1. internal/config/certs.go

    func ParsePublicCertFile(certFile string) (x509Certs []*x509.Certificate, err error) {
    	// Read certificate file.
    	var data []byte
    	if data, err = os.ReadFile(certFile); err != nil {
    		return nil, err
    	}
    
    	// Trimming leading and tailing white spaces.
    	data = bytes.TrimSpace(data)
    
    	// Parse all certs in the chain.
    	current := data
    	for len(current) > 0 {
    		var pemBlock *pem.Block
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. internal/grid/trace.go

    func (c *muxClient) traceRoundtrip(ctx context.Context, t *tracer, h HandlerID, req []byte) ([]byte, error) {
    	if t == nil || t.Publisher.NumSubscribers(t.TraceType) == 0 {
    		return c.roundtrip(h, req)
    	}
    
    	// Following trimming is needed for consistency between outputs with other internode traces.
    	local := strings.TrimPrefix(strings.TrimPrefix(t.Local, httpsScheme), httpScheme)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FormBodyTest.kt

        assertThat(formEncode(255)).isEqualTo("%C3%BF")
      }
    
      @Throws(IOException::class)
      private fun formEncode(codePoint: Int): String {
        // Wrap the codepoint with regular printable characters to prevent trimming.
        val body =
          FormBody.Builder()
            .add("a", String(intArrayOf('b'.code, codePoint, 'c'.code), 0, 3))
            .build()
        val buffer = Buffer()
        body.writeTo(buffer)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/security/http-basic-auth.md

        # Return some error
        ...
    ```
    
    But by using the `secrets.compare_digest()` it will be secure against a type of attacks called "timing attacks".
    
    ### Timing Attacks
    
    But what's a "timing attack"?
    
    Let's imagine some attackers are trying to guess the username and password.
    
    And they send a request with a username `johndoe` and a password `love123`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 16:01:27 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/security/http-basic-auth.md

        # Einen Error zurückgeben
        ...
    ```
    
    Aber durch die Verwendung von `secrets.compare_digest()` ist dieser Code sicher vor einer Art von Angriffen, die „Timing-Angriffe“ genannt werden.
    
    ### Timing-Angriffe
    
    Aber was ist ein „Timing-Angriff“?
    
    Stellen wir uns vor, dass einige Angreifer versuchen, den Benutzernamen und das Passwort zu erraten.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:25:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  6. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

    import okio.Buffer
    import org.junit.jupiter.api.Assumptions.assumeFalse
    import org.junit.jupiter.params.ParameterizedTest
    import org.junit.jupiter.params.provider.ArgumentsSource
    
    /**
     * Tests for round-tripping headers through hpack.
     *
     * TODO: update hpack-test-case with the output of our encoder.
     * This test will hide complementary bugs in the encoder and decoder,
     * We should test that the encoder is producing responses that are
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/security/http-basic-auth.md

        # Return some error
        ...
    ```
    
    Porém, ao utilizar o `secrets.compare_digest()`, isso estará seguro contra um tipo de ataque chamado "timing attacks" (ataques de temporização).
    
    ### Ataques de Temporização
    
    Mas o que é um "timing attack" (ataque de temporização)?
    
    Vamos imaginar que alguns invasores estão tentando adivinhar o usuário e a senha.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

          slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1);
        }
      }
    
      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
      private static BigInteger oldSlowFactorial(int n) {
        if (n <= 20) {
          return BigInteger.valueOf(LongMath.factorial(n));
        } else {
          int k = 20;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

          slowFactorials[i] = RANDOM_SOURCE.nextInt(factorialBound);
          binomials[i] = RANDOM_SOURCE.nextInt(factorials[i] + 1);
        }
      }
    
      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
      private static BigInteger oldSlowFactorial(int n) {
        if (n <= 20) {
          return BigInteger.valueOf(LongMath.factorial(n));
        } else {
          int k = 20;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. internal/lsync/lrwmutex.go

    	return locked
    }
    
    const (
    	lockRetryInterval = 50 * time.Millisecond
    )
    
    // lockLoop will acquire either a read or a write lock
    //
    // The call will block until the lock is granted using a built-in
    // timing randomized back-off algorithm to try again until successful
    func (lm *LRWMutex) lockLoop(ctx context.Context, id, source string, timeout time.Duration, isWriteLock bool) (locked bool) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.8K bytes
    - Viewed (0)
Back to top