- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NativeAES (0.26 sec)
-
internal/config/crypto.go
// // The same context must be provided when decrypting the // ciphertext. func Encrypt(k kms.KMS, plaintext io.Reader, ctx kms.Context) (io.Reader, error) { algorithm := sio.AES_256_GCM if !fips.Enabled && !sioutil.NativeAES() { algorithm = sio.ChaCha20Poly1305 } key, err := k.GenerateKey(context.Background(), "", ctx) if err != nil { return nil, err } stream, err := algorithm.Stream(key.Plaintext) if err != nil {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Mar 06 16:56:10 GMT 2023 - 4.8K bytes - Viewed (0) -
internal/kms/single-key.go
Err: fmt.Errorf("key %q does not exist", keyID), } } iv, err := sioutil.Random(16) if err != nil { return DEK{}, err } var algorithm string if sioutil.NativeAES() { algorithm = algorithmAESGCM } else { algorithm = algorithmChaCha20Poly1305 } var aead cipher.AEAD switch algorithm { case algorithmAESGCM: mac := hmac.New(sha256.New, kms.key)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Mar 01 21:09:42 GMT 2024 - 7.9K bytes - Viewed (0)