Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NewCFBDecrypter (0.29 sec)

  1. src/crypto/cipher/cfb_test.go

    		cfb.XORKeyStream(ciphertext, plaintext)
    
    		if !bytes.Equal(ciphertext, expected) {
    			t.Errorf("#%d: wrong output: got %x, expected %x", i, ciphertext, expected)
    		}
    
    		cfbdec := cipher.NewCFBDecrypter(block, iv)
    		plaintextCopy := make([]byte, len(ciphertext))
    		cfbdec.XORKeyStream(plaintextCopy, ciphertext)
    
    		if !bytes.Equal(plaintextCopy, plaintext) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:18:36 UTC 2019
    - 2.8K bytes
    - Viewed (0)
  2. src/crypto/cipher/cfb.go

    // size.
    func NewCFBEncrypter(block Block, iv []byte) Stream {
    	return newCFB(block, iv, false)
    }
    
    // NewCFBDecrypter returns a [Stream] which decrypts with cipher feedback mode,
    // using the given [Block]. The iv must be the same length as the [Block]'s block
    // size.
    func NewCFBDecrypter(block Block, iv []byte) Stream {
    	return newCFB(block, iv, true)
    }
    
    func newCFB(block Block, iv []byte, decrypt bool) Stream {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. src/crypto/cipher/benchmark_test.go

    	benchmarkAESStream(b, cipher.NewCFBEncrypter, make([]byte, almost1K))
    }
    
    func BenchmarkAESCFBDecrypt1K(b *testing.B) {
    	benchmarkAESStream(b, cipher.NewCFBDecrypter, make([]byte, almost1K))
    }
    
    func BenchmarkAESCFBDecrypt8K(b *testing.B) {
    	benchmarkAESStream(b, cipher.NewCFBDecrypter, make([]byte, almost8K))
    }
    
    func BenchmarkAESOFB1K(b *testing.B) {
    	benchmarkAESStream(b, cipher.NewOFB, make([]byte, almost1K))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 28 19:13:50 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  4. src/crypto/issue21104_test.go

    }
    func TestCFBEncryptOutOfBoundsWrite(t *testing.T) {
    	testBlock(t, "CFB Encrypt", cipher.NewCFBEncrypter)
    }
    func TestCFBDecryptOutOfBoundsWrite(t *testing.T) {
    	testBlock(t, "CFB Decrypt", cipher.NewCFBDecrypter)
    }
    func testBlock(t *testing.T, name string, newCipher func(cipher.Block, []byte) cipher.Stream) {
    	// This cipherText is encrypted "0123456789"
    	cipherText := []byte{86, 216, 121, 231, 219, 191, 26, 12, 176, 117}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 06 06:03:36 UTC 2017
    - 1.8K bytes
    - Viewed (0)
  5. src/crypto/cipher/cipher_test.go

    		cbcd.CryptBlocks(ct, pt[:0])
    		assertEqual("CBC decrypt", ct, pt)
    
    		cfbe := cipher.NewCFBEncrypter(b, iv)
    		cfbe.XORKeyStream(ct, pt[:0])
    		assertEqual("CFB encrypt", ct, pt)
    
    		cfbd := cipher.NewCFBDecrypter(b, iv)
    		cfbd.XORKeyStream(ct, pt[:0])
    		assertEqual("CFB decrypt", ct, pt)
    
    		ctr := cipher.NewCTR(b, iv)
    		ctr.XORKeyStream(ct, pt[:0])
    		assertEqual("CTR", ct, pt)
    
    		ofb := cipher.NewOFB(b, iv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 21:42:23 UTC 2016
    - 2.2K bytes
    - Viewed (0)
  6. src/crypto/cipher/example_test.go

    	if len(ciphertext) < aes.BlockSize {
    		panic("ciphertext too short")
    	}
    	iv := ciphertext[:aes.BlockSize]
    	ciphertext = ciphertext[aes.BlockSize:]
    
    	stream := cipher.NewCFBDecrypter(block, iv)
    
    	// XORKeyStream can work in-place if the two arguments are the same.
    	stream.XORKeyStream(ciphertext, ciphertext)
    	fmt.Printf("%s", ciphertext)
    	// Output: some plaintext
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 30 16:23:44 UTC 2018
    - 11.8K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(StreamWriter).Write", Method, 0},
    		{"AEAD", Type, 2},
    		{"Block", Type, 0},
    		{"BlockMode", Type, 0},
    		{"NewCBCDecrypter", Func, 0},
    		{"NewCBCEncrypter", Func, 0},
    		{"NewCFBDecrypter", Func, 0},
    		{"NewCFBEncrypter", Func, 0},
    		{"NewCTR", Func, 0},
    		{"NewGCM", Func, 2},
    		{"NewGCMWithNonceSize", Func, 5},
    		{"NewGCMWithTagSize", Func, 11},
    		{"NewOFB", Func, 0},
    		{"Stream", Type, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  8. api/go1.txt

    pkg crypto/aes, type KeySizeError int
    pkg crypto/cipher, func NewCBCDecrypter(Block, []uint8) BlockMode
    pkg crypto/cipher, func NewCBCEncrypter(Block, []uint8) BlockMode
    pkg crypto/cipher, func NewCFBDecrypter(Block, []uint8) Stream
    pkg crypto/cipher, func NewCFBEncrypter(Block, []uint8) Stream
    pkg crypto/cipher, func NewCTR(Block, []uint8) Stream
    pkg crypto/cipher, func NewOFB(Block, []uint8) Stream
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top