- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for NewCFBEncrypter (0.29 sec)
-
src/crypto/cipher/cfb_test.go
if err != nil { t.Fatal(err) } block, err := aes.NewCipher(key) if err != nil { t.Fatal(err) } ciphertext := make([]byte, len(plaintext)) cfb := cipher.NewCFBEncrypter(block, iv) cfb.XORKeyStream(ciphertext, plaintext) if !bytes.Equal(ciphertext, expected) { t.Errorf("#%d: wrong output: got %x, expected %x", i, ciphertext, expected) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:18:36 UTC 2019 - 2.8K bytes - Viewed (0) -
src/crypto/cipher/cfb.go
if !x.decrypt { copy(x.next[x.outUsed:], dst) } dst = dst[n:] src = src[n:] x.outUsed += n } } // NewCFBEncrypter returns a [Stream] which encrypts with cipher feedback mode, // using the given [Block]. The iv must be the same length as the [Block]'s block // size. func NewCFBEncrypter(block Block, iv []byte) Stream { return newCFB(block, iv, false) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 2K bytes - Viewed (0) -
src/crypto/issue21104_test.go
testBlock(t, "CTR", cipher.NewCTR) } func TestOFBOutOfBoundsWrite(t *testing.T) { testBlock(t, "OFB", cipher.NewOFB) } 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) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 06 06:03:36 UTC 2017 - 1.8K bytes - Viewed (0) -
src/crypto/cipher/cipher_test.go
cbce.CryptBlocks(ct, pt[:0]) assertEqual("CBC encrypt", ct, pt) cbcd := cipher.NewCBCDecrypter(b, iv) 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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 13 21:42:23 UTC 2016 - 2.2K bytes - Viewed (0) -
src/crypto/cipher/benchmark_test.go
// always be wordsize aligned, whereas non-aligned is a more typical // use-case. const almost1K = 1024 - 5 const almost8K = 8*1024 - 5 func BenchmarkAESCFBEncrypt1K(b *testing.B) { benchmarkAESStream(b, cipher.NewCFBEncrypter, make([]byte, almost1K)) } func BenchmarkAESCFBDecrypt1K(b *testing.B) { benchmarkAESStream(b, cipher.NewCFBDecrypter, make([]byte, almost1K)) } func BenchmarkAESCFBDecrypt8K(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 28 19:13:50 UTC 2021 - 3.3K bytes - Viewed (0) -
src/crypto/cipher/example_test.go
ciphertext := make([]byte, aes.BlockSize+len(plaintext)) iv := ciphertext[:aes.BlockSize] if _, err := io.ReadFull(rand.Reader, iv); err != nil { panic(err) } stream := cipher.NewCFBEncrypter(block, iv) stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext) // It's important to remember that ciphertexts must be authenticated // (i.e. by using crypto/hmac) as well as being encrypted in order to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 30 16:23:44 UTC 2018 - 11.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"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}, {"StreamReader", 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) -
api/go1.txt
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 pkg crypto/cipher, method (StreamReader) Read([]uint8) (int, error)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)