MCPcopy Create free account
hub / github.com/awslabs/llrt / as_object

Method as_object

modules/llrt_crypto/src/subtle/key_algorithm.rs:866–918  ·  view source on GitHub ↗
(&self, ctx: &Ctx<'js>, name: T)

Source from the content-addressed store, hash-verified

864 KeyUsageAlgorithm::DeriveAsymmetric,
865 )?,
866 "ECDSA" => Self::from_ec(
867 ctx,
868 mode,
869 obj,
870 algorithm_name,
871 EcAlgorithm::Ecdsa,
872 &usages,
873 &mut private_usages,
874 &mut public_usages,
875 KeyUsageAlgorithm::Sign,
876 )?,
877 "HMAC" => from_hmac(
878 ctx,
879 mode,
880 obj,
881 algorithm_name,
882 &usages,
883 &mut private_usages,
884 &mut public_usages,
885 )?,
886 "RSA-OAEP" | "RSA-PSS" | "RSASSA-PKCS1-v1_5" => from_rsa(
887 ctx,
888 mode,
889 obj,
890 algorithm_name,
891 &usages,
892 &mut private_usages,
893 &mut public_usages,
894 )?,
895 "HKDF" => from_hkdf(
896 ctx,
897 mode,
898 obj,
899 algorithm_name,
900 &usages,
901 &mut private_usages,
902 &mut public_usages,
903 )?,
904 "PBKDF2" => from_pbkdf2(
905 ctx,
906 mode,
907 obj,
908 algorithm_name,
909 &usages,
910 &mut private_usages,
911 &mut public_usages,
912 )?,
913 _ => return algorithm_not_supported_error(ctx),
914 };
915
916 Ok(KeyAlgorithmWithUsages {
917 name,
918 algorithm,
919 public_usages,
920 private_usages,
921 })

Callers 15

url_formatFunction · 0.80
allocFunction · 0.80
byte_lengthFunction · 0.80
fromFunction · 0.80
is_bufferFunction · 0.80
newMethod · 0.80
has_instanceMethod · 0.80
bytes_from_partsFunction · 0.80
newMethod · 0.80
from_jsMethod · 0.80
algorithmMethod · 0.80
from_valueMethod · 0.80

Calls 4

create_hash_objectFunction · 0.85
cloneMethod · 0.45
setMethod · 0.45
as_strMethod · 0.45

Tested by 1