Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for VerifyPKCS1v15 (0.46 sec)

  1. src/crypto/rsa/boring_test.go

    	err := VerifyPKCS1v15(key, 0, paddedHash, sig)
    	if err == nil {
    		t.Errorf("raw: expected verification error")
    	}
    
    	err = VerifyPKCS1v15(key, crypto.SHA1, hash, sig)
    	if err == nil {
    		t.Errorf("sha1: expected verification error")
    	}
    }
    
    func BenchmarkBoringVerify(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  2. src/crypto/rsa/pkcs1v15_test.go

    	if err != nil {
    		t.Fatalf("failed to decode signature: %s", err)
    	}
    
    	h := sha256.Sum256([]byte("hello"))
    	err = VerifyPKCS1v15(pub, crypto.SHA256, h[:], sig)
    	if err == nil {
    		t.Fatal("VerifyPKCS1v15 accepted a truncated signature")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  3. src/crypto/rsa/example_test.go

    	// that the hash function be collision resistant. SHA-256 is the
    	// least-strong hash function that should be used for this at the time
    	// of writing (2016).
    	hashed := sha256.Sum256(message)
    
    	err := rsa.VerifyPKCS1v15(&rsaPrivateKey.PublicKey, crypto.SHA256, hashed[:], signature)
    	if err != nil {
    		fmt.Fprintf(os.Stderr, "Error from verification: %s\n", err)
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:52:37 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top