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.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/aes/cipher.go b/src/crypto/aes/cipher.go
index c5a8e91d00..fbd01a8f40 100644
--- a/src/crypto/aes/cipher.go
+++ b/src/crypto/aes/cipher.go
@@ -6,6 +6,7 @@ package aes
import (
"crypto/cipher"
+ "crypto/internal/boring"
"strconv"
)
@@ -36,6 +37,9 @@ func NewCipher(key []byte) (cipher.Block, error) {
case 16, 24, 32:
break
}
+ if boring.Enabled {
+ return boring.NewAESCipher(key)
+ }
return newCipher(key)
}