# Crypto.subtle

**URL:** <https://forum.ionicframework.com/t/crypto-subtle/206836>\
**Category:** Capacitor\
**Created:** [March 19, 2021, 10:15pm UTC](https://forum.ionicframework.com/t/crypto-subtle/206836 "2021-03-19T22:15:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 19, 2021, 10:21pm UTC](https://forum.ionicframework.com/t/crypto-subtle/206836/2 "2021-03-19T22:21:29Z")

</div>

More detail on what “your tests” constitute and what you define as “not working” would be extremely helpful to anybody attempting to assist your cause.

I haven’t dealt with this issue in a couple of years, so things may have changed, but one potential pitfall that used to be a concern is that the `Promise`s that `crypto.subtle` returns are not zone-aware, so if you are trying to use them in an Angular app (I have no idea how other frameworks handle this), you need to zonify them.

The method that I settled on as being most futureproof (i.e. “does not rely explicitly on zone.js being present”) is to simply wrap them inside a `Promise.resolve` in your code. See [here](https://forum.ionicframework.com/t/cant-use-crypto-on-ionic/188852/4) for an example.

---

_[View the full topic](https://forum.ionicframework.com/t/crypto-subtle/206836)._
