Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for emsaPSSEncode (0.11 sec)

  1. src/crypto/rsa/rsa_export_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package rsa
    
    var NonZeroRandomBytes = nonZeroRandomBytes
    var EMSAPSSEncode = emsaPSSEncode
    var EMSAPSSVerify = emsaPSSVerify
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 327 bytes
    - Viewed (0)
  2. src/crypto/rsa/pss_test.go

    		0x3b, 0xad, 0x54, 0x6f, 0xbe, 0x8c, 0xfe, 0xbc,
    	}
    
    	hash := sha1.New()
    	hash.Write(msg)
    	hashed := hash.Sum(nil)
    
    	encoded, err := EMSAPSSEncode(hashed, 1023, salt, sha1.New())
    	if err != nil {
    		t.Errorf("Error from emsaPSSEncode: %s\n", err)
    	}
    	if !bytes.Equal(encoded, expected) {
    		t.Errorf("Bad encoding. got %x, want %x", encoded, expected)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  3. src/crypto/rsa/pss.go

    //
    // where
    //
    //     DB = PS || 0x01 || salt
    //
    // and PS can be empty so
    //
    //     emLen = dbLen + hLen + 1 = psLen + sLen + hLen + 2
    //
    
    func emsaPSSEncode(mHash []byte, emBits int, salt []byte, hash hash.Hash) ([]byte, error) {
    	// See RFC 8017, Section 9.1.1.
    
    	hLen := hash.Size()
    	sLen := len(salt)
    	emLen := (emBits + 7) / 8
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top