]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/crypto/corecrypto_aes.c
xnu-2782.20.48.tar.gz
[apple/xnu.git] / libkern / crypto / corecrypto_aes.c
index 161715af1c4ccf4fb0e7b962634d925cb94559a2..bec9846e154c8eacbe6f51130a79e006784acd2b 100644 (file)
@@ -57,11 +57,13 @@ aes_rval aes_encrypt_cbc(const unsigned char *in_blk, const unsigned char *in_iv
        return aes_good;
 }
 
+#if defined (__i386__) || defined (__x86_64__) || defined (__arm64__)
 /* This does one block of ECB, using the CBC implementation - this allow to use the same context for both CBC and ECB */
 aes_rval aes_encrypt(const unsigned char *in_blk, unsigned char *out_blk, aes_encrypt_ctx cx[1])
 {
        return aes_encrypt_cbc(in_blk, NULL, 1, out_blk, cx);    
 }
+#endif
 
 aes_rval aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1])
 {
@@ -88,11 +90,13 @@ aes_rval aes_decrypt_cbc(const unsigned char *in_blk, const unsigned char *in_iv
        return aes_good;
 }
 
+#if defined (__i386__) || defined (__x86_64__) || defined (__arm64__)
 /* This does one block of ECB, using the CBC implementation - this allow to use the same context for both CBC and ECB */
 aes_rval aes_decrypt(const unsigned char *in_blk, unsigned char *out_blk, aes_decrypt_ctx cx[1])
 {
        return aes_decrypt_cbc(in_blk, NULL, 1, out_blk, cx);
 }
+#endif
 
 aes_rval aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1])
 {