# std.crypto: Add \`isComptime\` guard around intrinsics · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f9fe548e41a41e3edcff4d30f495246d0fee145b)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f9fe548e41a41e3edcff4d30f495246d0fee145b

Requested commit: f9fe548e41a41e3edcff4d30f495246d0fee145b

Commit: f9fe548e41a41e3edcff4d30f495246d0fee145b

Tree: 30a80aa37a47e5cd4f58b62df331506b12ac6f43

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
std.crypto: Add `isComptime` guard around intrinsics

Comptime code can't execute assembly code, so we need some way to
force comptime code to use the generic path. This should be replaced
with whatever is implemented for #868, when that day comes.

I am seeing that the result for the hash is incorrect in stage1 and
crashes stage2, so presumably this never worked correctly. I will follow
up on that soon.

```

## Parents

- [4c1f71e866088a1a2e943331256115ed7e3daf98](https://git.cafe/gitcafe/zig/commit/4c1f71e866088a1a2e943331256115ed7e3daf98?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f9fe548e41a41e3edcff4d30f495246d0fee145b?format=markdown)
