- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 73 for cipherText (0.29 sec)
-
src/crypto/cipher/example_test.go
// include it at the beginning of the ciphertext. 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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 30 16:23:44 UTC 2018 - 11.8K bytes - Viewed (0) -
internal/kms/secret-key.go
// and MinKMS, and legacy JSON formatted ciphertexts. func (s secretKey) Decrypt(_ context.Context, req *DecryptRequest) ([]byte, error) { if req.Name != s.keyID { return nil, ErrKeyNotFound } const randSize = 28 ciphertext, keyType := parseCiphertext(req.Ciphertext) ciphertext, random := ciphertext[:len(ciphertext)-randSize], ciphertext[len(ciphertext)-randSize:]
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 8.2K bytes - Viewed (0) -
internal/kms/conn.go
Version uint32 `json:"version,omitempty"` Ciphertext []byte `json:"ciphertext"` } return json.Marshal(JSON{ KeyID: d.KeyID, Version: uint32(d.Version), Ciphertext: d.Ciphertext, }) } // UnmarshalText tries to decode text as JSON representation // of a DEK and sets DEK's key ID and ciphertext to the // decoded values. // // It sets DEK's plaintext to nil.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 5K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go
s.XORKeyStream(ciphertext, plaintext) p := poly1305.New(&polyKey) writeWithPadding(p, additionalData) writeWithPadding(p, ciphertext) writeUint64(p, len(additionalData)) writeUint64(p, len(plaintext)) p.Sum(tag[:0]) return ret } func (c *chacha20poly1305) openGeneric(dst, nonce, ciphertext, additionalData []byte) ([]byte, error) { tag := ciphertext[len(ciphertext)-16:]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 00:11:50 UTC 2022 - 2.2K bytes - Viewed (0) -
src/crypto/cipher/cfb_test.go
rand.Reader.Read(iv) cfb := cipher.NewCFBEncrypter(block, iv) ciphertext := make([]byte, len(plaintext)) copy(ciphertext, plaintext) cfb.XORKeyStream(ciphertext, ciphertext) cfbdec := cipher.NewCFBDecrypter(block, iv) plaintextCopy := make([]byte, len(plaintext)) copy(plaintextCopy, ciphertext) cfbdec.XORKeyStream(plaintextCopy, plaintextCopy) 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) -
internal/kms/dek_test.go
} if key.Plaintext != nil { t.Fatalf("Test %d: unmarshaled DEK contains non-nil plaintext", i) } if !bytes.Equal(key.Ciphertext, test.Key.Ciphertext) { t.Fatalf("Test %d: ciphertext mismatch: got %x - want %x", i, key.Ciphertext, test.Key.Ciphertext) } } } func mustDecodeB64(s string) []byte { b, err := base64.StdEncoding.DecodeString(s) if err != nil { panic(err) } return b
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 2.6K bytes - Viewed (0) -
src/crypto/aes/gcm_ppc64x.go
} tag := ciphertext[len(ciphertext)-g.tagSize:] ciphertext = ciphertext[:len(ciphertext)-g.tagSize] var counter, tagMask [gcmBlockSize]byte g.deriveCounter(&counter, nonce) g.cipher.Encrypt(tagMask[:], counter[:]) gcmInc32(&counter) var expectedTag [gcmTagSize]byte g.auth(expectedTag[:], ciphertext, data, &tagMask) ret, out := sliceForAppend(dst, len(ciphertext))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 6.4K bytes - Viewed (0) -
src/crypto/aes/aes_gcm.go
panic("crypto/cipher: incorrect GCM tag size") } if len(ciphertext) < g.tagSize { return nil, errOpen } if uint64(len(ciphertext)) > ((1<<32)-2)*uint64(BlockSize)+uint64(g.tagSize) { return nil, errOpen } tag := ciphertext[len(ciphertext)-g.tagSize:] ciphertext = ciphertext[:len(ciphertext)-g.tagSize] // See GCM spec, section 7.1. var counter, tagMask [gcmBlockSize]byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 18:23:49 UTC 2024 - 5.4K bytes - Viewed (0) -
src/crypto/issue21104_test.go
// This cipherText is encrypted "0123456789" cipherText := []byte{86, 216, 121, 231, 219, 191, 26, 12, 176, 117} var iv, key [16]byte block, err := aes.NewCipher(key[:]) if err != nil { panic(err) } stream := newCipher(block, iv[:]) test(t, name, cipherText, stream.XORKeyStream) } func test(t *testing.T, name string, cipherText []byte, xor func([]byte, []byte)) { want := "abcdefghij"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 06 06:03:36 UTC 2017 - 1.8K bytes - Viewed (0) -
internal/config/crypto.go
// The context is bound to the returned ciphertext. // // The same context must be provided when decrypting the // ciphertext. func EncryptBytes(k *kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) { ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context) if err != nil { return nil, err } return io.ReadAll(ciphertext) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 5K bytes - Viewed (0)