aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/aes/cipher.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/aes/cipher.go')
-rw-r--r--src/crypto/aes/cipher.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/aes/cipher.go b/src/crypto/aes/cipher.go
index bb93fbb36e2..29d01796eb3 100644
--- a/src/crypto/aes/cipher.go
+++ b/src/crypto/aes/cipher.go
@@ -10,6 +10,8 @@ import (
"strconv"
)
+import "crypto/internal/boring"
+
// The AES block size in bytes.
const BlockSize = 16
@@ -37,6 +39,9 @@ func NewCipher(key []byte) (cipher.Block, error) {
case 16, 24, 32:
break
}
+ if boring.Enabled {
+ return boring.NewAESCipher(key)
+ }
return newCipher(key)
}