• Home
  • Raw
  • Download

Lines Matching refs:algorithm

64 async function digest(algorithm, data) {  argument
70 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
79 algorithm = normalizeAlgorithm(algorithm, 'digest');
81 return ReflectApply(asyncDigest, this, [algorithm, data]);
90 algorithm, argument
98 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
111 algorithm = normalizeAlgorithm(algorithm, 'generateKey');
114 switch (algorithm.name) {
122 .rsaKeyGenerate(algorithm, extractable, keyUsages);
133 .cfrgGenerateKey(algorithm, extractable, keyUsages);
140 .ecGenerateKey(algorithm, extractable, keyUsages);
145 .hmacGenerateKey(algorithm, extractable, keyUsages);
156 .aesGenerateKey(algorithm, extractable, keyUsages);
176 async function deriveBits(algorithm, baseKey, length) { argument
182 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
197 algorithm = normalizeAlgorithm(algorithm, 'deriveBits');
203 if (baseKey.algorithm.name !== algorithm.name)
205 switch (algorithm.name) {
212 .ecdhDeriveBits(algorithm, baseKey, length);
215 .hkdfDeriveBits(algorithm, baseKey, length);
218 .pbkdf2DeriveBits(algorithm, baseKey, length);
250 algorithm, argument
260 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
281 algorithm = normalizeAlgorithm(algorithm, 'deriveBits');
288 if (baseKey.algorithm.name !== algorithm.name)
293 switch (algorithm.name) {
300 .ecdhDeriveBits(algorithm, baseKey, length);
304 .hkdfDeriveBits(algorithm, baseKey, length);
308 .pbkdf2DeriveBits(algorithm, baseKey, length);
322 switch (key.algorithm.name) {
356 `Unable to export a raw ${key.algorithm.name} ${key.type} key`,
361 switch (key.algorithm.name) {
395 `Unable to export a pkcs8 ${key.algorithm.name} ${key.type} key`,
400 switch (key.algorithm.name) {
434 `Unable to export a raw ${key.algorithm.name} ${key.type} key`,
443 switch (key.algorithm.name) {
446 key.algorithm.hash.name,
451 key.algorithm.hash.name,
456 key.algorithm.hash.name,
462 jwk.crv ||= key.algorithm.namedCurve;
467 jwk.crv ||= key.algorithm.name;
472 jwk.crv ||= key.algorithm.name;
483 .getAlgorithmName(key.algorithm.name, key.algorithm.length);
487 key.algorithm.hash.name,
572 algorithm, argument
589 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
602 algorithm = normalizeAlgorithm(algorithm, 'importKey');
604 switch (algorithm.name) {
611 .rsaImportKey(format, keyData, algorithm, extractable, keyUsages);
617 .ecImportKey(format, keyData, algorithm, extractable, keyUsages);
627 .cfrgImportKey(format, keyData, algorithm, extractable, keyUsages);
631 .hmacImportKey(format, keyData, algorithm, extractable, keyUsages);
641 .aesImportKey(algorithm, format, keyData, extractable, keyUsages);
647 algorithm,
668 async function wrapKey(format, key, wrappingKey, algorithm) { argument
686 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
692 algorithm = normalizeAlgorithm(algorithm, 'wrapKey');
694 algorithm = normalizeAlgorithm(algorithm, 'encrypt');
704 if (algorithm.name === 'AES-KW' && raw.length % 8 !== 0) {
713 algorithm,
798 function signVerify(algorithm, key, data, signature) { argument
803 algorithm = normalizeAlgorithm(algorithm, usage);
806 algorithm.name !== key.algorithm.name) {
812 switch (algorithm.name) {
817 .rsaSignVerify(key, data, algorithm, signature);
820 .ecdsaSignVerify(key, data, algorithm, signature);
826 .eddsaSignVerify(key, data, algorithm, signature);
829 .hmacSignVerify(key, data, algorithm, signature);
834 async function sign(algorithm, key, data) { argument
840 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
853 return signVerify(algorithm, key, data);
856 async function verify(algorithm, key, signature, data) { argument
862 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
879 return signVerify(algorithm, key, data, signature);
882 async function cipherOrWrap(mode, algorithm, key, data, op) { argument
888 if (key.algorithm.name !== algorithm.name ||
900 switch (algorithm.name) {
903 .rsaCipher(mode, key, data, algorithm);
910 .aesCipher(mode, key, data, algorithm);
914 .aesCipher(mode, key, data, algorithm);
920 async function encrypt(algorithm, key, data) { argument
926 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
939 algorithm = normalizeAlgorithm(algorithm, 'encrypt');
940 return cipherOrWrap(kWebCryptoCipherEncrypt, algorithm, key, data, 'encrypt');
943 async function decrypt(algorithm, key, data) { argument
949 algorithm = webidl.converters.AlgorithmIdentifier(algorithm, {
962 algorithm = normalizeAlgorithm(algorithm, 'decrypt');
963 return cipherOrWrap(kWebCryptoCipherDecrypt, algorithm, key, data, 'decrypt');