Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 231 for Algorithm (0.28 sec)

  1. docs_src/security/tutorial005_py39.py

        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    async def get_current_user(
        security_scopes: SecurityScopes, token: str = Depends(oauth2_scheme)
    ):
        if security_scopes.scopes:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  2. internal/crypto/metadata_test.go

    		}
    		if keyID != test.KeyID {
    			t.Errorf("Test %d: got key-ID '%v' - want key-ID '%v'", i, keyID, test.KeyID)
    		}
    		if sealedKey.Algorithm != test.SealedKey.Algorithm {
    			t.Errorf("Test %d: got sealed key algorithm '%v' - want sealed key algorithm '%v'", i, sealedKey.Algorithm, test.SealedKey.Algorithm)
    		}
    		if !bytes.Equal(sealedKey.Key[:], test.SealedKey.Key[:]) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

            Hashing.hmacSha1(keyData).toString());
    
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(SHA256_KEY).toString());
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(keyData).toString());
    
        assertEquals(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  4. cmd/signature-v4_test.go

    		{
    			region:   globalMinioDefaultRegion,
    			expected: ErrInvalidQueryParams,
    		},
    		// (1) Should error on an invalid access key.
    		{
    			queryParams: map[string]string{
    				"X-Amz-Algorithm":     signV4Algorithm,
    				"X-Amz-Date":          now.Format(iso8601Format),
    				"X-Amz-Expires":       "60",
    				"X-Amz-Signature":     "badsignature",
    				"X-Amz-SignedHeaders": "host;x-amz-content-sha256;x-amz-date",
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  5. guava-tests/benchmark/com/google/common/hash/MessageDigestCreationBenchmark.java

      private String algorithm;
    
      private MessageDigest md;
    
      @BeforeExperiment
      void setUp() throws Exception {
        md = MessageDigest.getInstance(algorithm);
      }
    
      @Benchmark
      int getInstance(int reps) throws Exception {
        int retValue = 0;
        for (int i = 0; i < reps; i++) {
          retValue ^= MessageDigest.getInstance(algorithm).getDigestLength();
        }
        return retValue;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/Hashing.java

      /**
       * Returns a hash function implementing the Message Authentication Code (MAC) algorithm, using the
       * MD5 (128 hash bits) hash function and a {@link SecretKeySpec} created from the given byte array
       * and the MD5 algorithm.
       *
       * <p>If you are designing a new system that needs HMAC, prefer {@link #hmacSha256} or other
       * future-proof algorithms <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  7. cmd/signature-v4-parser_test.go

    			expectedErrCode:       ErrInvalidQuerySignatureAlgo,
    		},
    		// Test case - 3.
    		// Test case with valid "X-Amz-Algorithm" query value, but invalid  "X-Amz-Credential" header.
    		// Malformed crenential.
    		{
    			inputQueryKeyVals: []string{
    				// valid  "X-Amz-Algorithm" header.
    				"X-Amz-Algorithm", signV4Algorithm,
    				// valid  "X-Amz-Credential" header.
    				"X-Amz-Credential", "invalid-credential",
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 27.4K bytes
    - Viewed (0)
  8. internal/crypto/sse-c.go

    	}
    	if algorithm != SealAlgorithm && algorithm != InsecureSealAlgorithm {
    		return sealedKey, errInvalidInternalSealAlgorithm
    	}
    	encryptedKey, err := base64.StdEncoding.DecodeString(b64SealedKey)
    	if err != nil || len(encryptedKey) != 64 {
    		return sealedKey, Errorf("The internal sealed key for SSE-C is invalid")
    	}
    
    	sealedKey.Algorithm = algorithm
    	copy(sealedKey.IV[:], iv)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/hash/MessageDigestCreationBenchmark.java

      private String algorithm;
    
      private MessageDigest md;
    
      @BeforeExperiment
      void setUp() throws Exception {
        md = MessageDigest.getInstance(algorithm);
      }
    
      @Benchmark
      int getInstance(int reps) throws Exception {
        int retValue = 0;
        for (int i = 0; i < reps; i++) {
          retValue ^= MessageDigest.getInstance(algorithm).getDigestLength();
        }
        return retValue;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  10. internal/crypto/key.go

    func (key *ObjectKey) Unseal(extKey []byte, sealedKey SealedKey, domain, bucket, object string) error {
    	var unsealConfig sio.Config
    	switch sealedKey.Algorithm {
    	default:
    		return Errorf("The sealing algorithm '%s' is not supported", sealedKey.Algorithm)
    	case SealAlgorithm:
    		mac := hmac.New(sha256.New, extKey)
    		mac.Write(sealedKey.IV[:])
    		mac.Write([]byte(domain))
    		mac.Write([]byte(SealAlgorithm))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top