Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for permuteBlock (0.12 sec)

  1. src/crypto/des/block.go

    // for sBoxes[s][i][j] << 4*(7-s)
    var feistelBox [8][64]uint32
    
    var feistelBoxOnce sync.Once
    
    // general purpose function to perform DES block permutations.
    func permuteBlock(src uint64, permutation []uint8) (block uint64) {
    	for position, n := range permutation {
    		bit := (src >> n) & 1
    		block |= bit << uint((len(permutation)-1)-position)
    	}
    	return
    }
    
    func initFeistelBox() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top