aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/crypto.classes.ts
blob: 2f686a69d415616bf32063514ca1fb73129f170d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { define } from "../scripts/class-definitions";

const names = ["SHA1", "MD5", "MD4", "SHA224", "SHA512", "SHA384", "SHA256", "SHA512_256"];
const named = names.map(name => {
  return define({
    name: name,
    construct: true,
    finalize: true,
    configurable: false,
    klass: {
      hash: {
        fn: "hash",
        length: 2,
      },
      byteLength: {
        getter: "getByteLengthStatic",
      },
    },
    JSType: "0b11101110",
    proto: {
      digest: {
        fn: "digest",
        length: 0,
      },
      update: {
        fn: "update",
        length: 1,
      },
      byteLength: {
        getter: "getByteLength",
      },
    },
  });
});

export default [
  ...named,
  define({
    name: "CryptoHasher",
    construct: true,
    finalize: true,
    klass: {
      hash: {
        fn: "hash",
        length: 2,
      },
      algorithms: {
        getter: "getAlgorithms",
        cache: true,
      },
    },
    JSType: "0b11101110",
    proto: {
      digest: {
        fn: "digest",
        length: 0,
      },
      algorithm: {
        getter: "getAlgorithm",
        cache: true,
      },
      update: {
        fn: "update",
        length: 2,
      },
      byteLength: {
        getter: "getByteLength",
      },
    },
  }),
];
&follow=1'>index.astro (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-28[ci] formatGravatar TK 1-2/+2
2024-03-28feat: allow dynamic route segments in isr.exclude array (#10513)Gravatar TK 5-3/+69
* Allow dynamic route segments in isr.exclude array * copy over eslint-disable as well * add test * update test: slashes dont need to be escaped * update changeset --------- Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
2024-03-28[ci] formatGravatar Houston (Bot) 2-3/+3
2024-03-28[ci] release (#10597)Gravatar Houston (Bot) 37-66/+89
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-28db: Rework index config with generated index names (#10589)Gravatar Ben Holmes 6-68/+344
* feat: add indexes array config with name gen * fix: add _idx suffix, remove name from output * feat(test): new index config * chore: remove unused type * chore: changeset * chore: add sort() for consistent names * feat(test): consistent column ordering * feat(test): ensure no queries when migrating legacy to new