]> Repositorios git - scryer-prolog.git/commitdiff
fix spelling
authorSkgland <[email protected]>
Sun, 24 May 2026 21:55:19 +0000 (23:55 +0200)
committerBennet Bleßmann <[email protected]>
Sun, 24 May 2026 21:55:19 +0000 (23:55 +0200)
Cargo.toml
src/machine/system_calls.rs

index 5154456cd1f5bca7be23ed1b4b8585a79ecfd31e..9c49139d0b47565c44b79bb8af0780bbc17159b9 100644 (file)
@@ -23,7 +23,7 @@ default = ["all-simple-cross", "tls", "http"]
 # currently does not include
 # ffi due to libffi
 # tls, http due to openssl
-# crypto-inpure due to ring
+# crypto-impure due to ring
 all-pure = ["repl", "hostname"]
 # enables all features that are simple to get working for cross-compliation
 # currently all but tls, http as those depend on openssl
@@ -34,8 +34,8 @@ hostname = ["dep:hostname"]
 tls = ["dep:native-tls"]
 http = ["dep:warp", "dep:reqwest"]
 # crypto function that require non pure-rust dependencies
-crypto-inpure = ["dep:ring"]
-crypto-full = ["crypto-inpure"]
+crypto-impure = ["dep:ring"]
+crypto-full = ["crypto-impure"]
 
 [lints.clippy]
 collapsible_match = "allow"
index 5daa2af8a533c1687ab4dae44ba6c2795569f8bf..2954ba39fb055050d7611dfa05936376cc0d2f77 100644 (file)
@@ -76,7 +76,7 @@ use blake2::{Blake2b512, Blake2s256};
 
 #[cfg(feature = "crypto-full")]
 use ring::aead;
-#[cfg(feature = "crypto-inpure")]
+#[cfg(feature = "crypto-impure")]
 use ring::{
     digest, hkdf, hmac, pbkdf2,
     rand::{SecureRandom, SystemRandom},
@@ -7846,7 +7846,7 @@ impl Machine {
 
     #[inline(always)]
     pub(crate) fn crypto_random_byte(&mut self) {
-        #[cfg(feature = "crypto-inpure")]
+        #[cfg(feature = "crypto-impure")]
         {
             let arg = self.machine_st.registers[1];
             let mut bytes: [u8; 1] = [0];
@@ -7866,7 +7866,7 @@ impl Machine {
             self.machine_st.unify_fixnum(byte, arg);
         }
 
-        #[cfg(not(feature = "crypto-inpure"))]
+        #[cfg(not(feature = "crypto-impure"))]
         {
             let stub_gen = || functor_stub(atom!("crypto_random_byte"), 1);
             let err = self.machine_st.missing_feature_error(atom!("crypto"));
@@ -8004,7 +8004,7 @@ impl Machine {
                 )
             }
             _ => {
-                #[cfg(feature = "crypto-inpure")]
+                #[cfg(feature = "crypto-impure")]
                 {
                     let ints = digest::digest(
                         match algorithm {
@@ -8030,7 +8030,7 @@ impl Machine {
                         )
                     )
                 }
-                #[cfg(not(feature = "crypto-inpure"))]
+                #[cfg(not(feature = "crypto-impure"))]
                 {
                     let stub_gen = || functor_stub(atom!("crypto_data_hash"), 1);
                     let err = self.machine_st.missing_feature_error(atom!("crypto"));
@@ -8048,7 +8048,7 @@ impl Machine {
     pub(crate) fn crypto_hmac(&mut self) {
         let stub_gen = || functor_stub(atom!("crypto_data_hash"), 3);
 
-        #[cfg(feature = "crypto-inpure")]
+        #[cfg(feature = "crypto-impure")]
         {
             let encoding = cell_as_atom!(self.deref_register(2));
             let data = self.string_encoding_bytes(self.machine_st.registers[1], encoding);
@@ -8084,7 +8084,7 @@ impl Machine {
             unify!(self.machine_st, self.machine_st.registers[4], ints_list);
         }
 
-        #[cfg(not(feature = "crypto-inpure"))]
+        #[cfg(not(feature = "crypto-impure"))]
         {
             let err = self.machine_st.missing_feature_error(atom!("crypto"));
             let exception = self.machine_st.error_form(err, stub_gen());
@@ -8096,7 +8096,7 @@ impl Machine {
     pub(crate) fn crypto_data_hkdf(&mut self) {
         let stub1_gen = || functor_stub(atom!("crypto_data_hkdf"), 4);
 
-        #[cfg(feature = "crypto-inpure")]
+        #[cfg(feature = "crypto-impure")]
         {
             let encoding = cell_as_atom!(self.deref_register(2));
             let data = self.string_encoding_bytes(self.machine_st.registers[1], encoding);
@@ -8167,7 +8167,7 @@ impl Machine {
             unify!(self.machine_st, self.machine_st.registers[7], ints_list);
         }
 
-        #[cfg(not(feature = "crypto-inpure"))]
+        #[cfg(not(feature = "crypto-impure"))]
         {
             let err = self.machine_st.missing_feature_error(atom!("crypto"));
             let exception = self.machine_st.error_form(err, stub1_gen());
@@ -8179,7 +8179,7 @@ impl Machine {
     pub(crate) fn crypto_password_hash(&mut self) {
         let stub1_gen = || functor_stub(atom!("crypto_password_hash"), 3);
 
-        #[cfg(feature = "crypto-inpure")]
+        #[cfg(feature = "crypto-impure")]
         {
             use std::num::NonZeroU32;
             let data = self
@@ -8235,7 +8235,7 @@ impl Machine {
             unify!(self.machine_st, self.machine_st.registers[4], ints_list);
         }
 
-        #[cfg(not(feature = "crypto-inpure"))]
+        #[cfg(not(feature = "crypto-impure"))]
         {
             let err = self.machine_st.missing_feature_error(atom!("crypto"));
             let exception = self.machine_st.error_form(err, stub1_gen());
@@ -9602,7 +9602,7 @@ impl Machine {
     }
 }
 
-#[cfg(feature = "crypto-inpure")]
+#[cfg(feature = "crypto-impure")]
 fn rng() -> &'static dyn SecureRandom {
     use std::ops::Deref;
 
@@ -9611,10 +9611,10 @@ fn rng() -> &'static dyn SecureRandom {
     RANDOM.deref()
 }
 
-#[cfg(feature = "crypto-inpure")]
+#[cfg(feature = "crypto-impure")]
 struct MyKey<T: core::fmt::Debug + PartialEq>(T);
 
-#[cfg(feature = "crypto-inpure")]
+#[cfg(feature = "crypto-impure")]
 impl hkdf::KeyType for MyKey<usize> {
     fn len(&self) -> usize {
         self.0