Skip to content

Commit

Permalink
refactor(crypto): removed unused code from Wasm build (#4510)
Browse files Browse the repository at this point in the history
* crypto/wasm: rebuild

* crypto/wasm: update to rust 1.77.0

* crypto/wasm: removed unused code from wasm_bindgen interface

* crypto/wasm: removed unused code from digest.rs

* crypto/wasm: fix doc comment

* crypto/wasm: drops rust back to version 1.76.0

* tweak

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
  • Loading branch information
jeremyBanks and iuioiua authored Mar 23, 2024
1 parent 4476088 commit d78b585
Show file tree
Hide file tree
Showing 6 changed files with 2,302 additions and 3,189 deletions.
2 changes: 1 addition & 1 deletion crypto/_wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
# Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

[package]
edition = "2021"
Expand Down
46 changes: 1 addition & 45 deletions crypto/_wasm/lib/deno_std_wasm_crypto.generated.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -61,35 +61,6 @@ export class DigestContext {
*/
update(data: Uint8Array): void;
/**
* Returns the digest of the input data so far. This may be called repeatedly
* without side effects.
*
* `length` will usually be left `undefined` to use the default length for
* the algorithm. For algorithms with variable-length output, it can be used
* to specify a non-negative integer number of bytes.
*
* An error will be thrown if `algorithm` is not a supported hash algorithm or
* `length` is not a supported length for the algorithm.
* @param {number | undefined} [length]
* @returns {Uint8Array}
*/
digest(length?: number): Uint8Array;
/**
* Returns the digest of the input data so far, and resets this context to
* its initial state, as though it has not yet been provided with any input
* data. (It will still use the same algorithm.)
*
* `length` will usually be left `undefined` to use the default length for
* the algorithm. For algorithms with variable-length output, it can be used
* to specify a non-negative integer number of bytes.
*
* An error will be thrown if `algorithm` is not a supported hash algorithm or
* `length` is not a supported length for the algorithm.
* @param {number | undefined} [length]
* @returns {Uint8Array}
*/
digestAndReset(length?: number): Uint8Array;
/**
* Returns the digest of the input data so far, and then drops the context
* from memory on the Wasm side. This context must no longer be used, and any
* further method calls will result in null pointer errors being thrown.
Expand All @@ -99,24 +70,9 @@ export class DigestContext {
* the algorithm. For algorithms with variable-length output, it can be used
* to specify a non-negative integer number of bytes.
*
* An error will be thrown if `algorithm` is not a supported hash algorithm or
* `length` is not a supported length for the algorithm.
* An error will be thrown if `length` is not a supported length for the algorithm.
* @param {number | undefined} [length]
* @returns {Uint8Array}
*/
digestAndDrop(length?: number): Uint8Array;
/**
* Resets this context to its initial state, as though it has not yet been
* provided with any input data. (It will still use the same algorithm.)
*/
reset(): void;
/**
* Returns a new `DigestContext` that is a copy of this one, i.e., using the
* same algorithm and with a copy of the same internal state.
*
* This may be a more efficient option for computing multiple digests that
* start with a common prefix.
* @returns {DigestContext}
*/
clone(): DigestContext;
}
Loading

0 comments on commit d78b585

Please sign in to comment.