firefly-compiler 0.4.35 → 0.4.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/bin/Release.ff +30 -8
  2. package/compiler/Compiler.ff +1 -1
  3. package/core/BrowserSystem.ff +3 -0
  4. package/core/Buffer.ff +3 -3
  5. package/core/BuildSystem.ff +3 -0
  6. package/core/Crypto.ff +102 -0
  7. package/core/Instant.ff +17 -0
  8. package/core/NodeSystem.ff +3 -0
  9. package/core/Stream.ff +1 -1
  10. package/experimental/random/RunLength.ff +3 -3
  11. package/experimental/s3/S3TestAuthorizationHeader.ff +39 -0
  12. package/experimental/s3/S3TestPut.ff +16 -0
  13. package/lsp/LanguageServer.ff +2 -2
  14. package/output/js/ff/compiler/Builder.mjs +1 -1
  15. package/output/js/ff/compiler/Compiler.mjs +2 -2
  16. package/output/js/ff/compiler/Dependencies.mjs +1 -1
  17. package/output/js/ff/compiler/DependencyLock.mjs +1 -1
  18. package/output/js/ff/compiler/Deriver.mjs +1 -1
  19. package/output/js/ff/compiler/Dictionaries.mjs +1 -1
  20. package/output/js/ff/compiler/Environment.mjs +1 -1
  21. package/output/js/ff/compiler/Inference.mjs +1 -1
  22. package/output/js/ff/compiler/JsEmitter.mjs +1 -1
  23. package/output/js/ff/compiler/JsImporter.mjs +1 -1
  24. package/output/js/ff/compiler/LspHook.mjs +1 -1
  25. package/output/js/ff/compiler/Main.mjs +1 -1
  26. package/output/js/ff/compiler/ModuleCache.mjs +1 -1
  27. package/output/js/ff/compiler/Parser.mjs +1 -1
  28. package/output/js/ff/compiler/Patterns.mjs +1 -1
  29. package/output/js/ff/compiler/Resolver.mjs +1 -1
  30. package/output/js/ff/compiler/Substitution.mjs +1 -1
  31. package/output/js/ff/compiler/Syntax.mjs +1 -1
  32. package/output/js/ff/compiler/Token.mjs +1 -1
  33. package/output/js/ff/compiler/Tokenizer.mjs +1 -1
  34. package/output/js/ff/compiler/Unification.mjs +1 -1
  35. package/output/js/ff/compiler/Wildcards.mjs +1 -1
  36. package/output/js/ff/compiler/Workspace.mjs +1 -1
  37. package/output/js/ff/core/Any.mjs +1 -1
  38. package/output/js/ff/core/Array.mjs +1 -1
  39. package/output/js/ff/core/AssetSystem.mjs +1 -1
  40. package/output/js/ff/core/Atomic.mjs +1 -1
  41. package/output/js/ff/core/Bool.mjs +1 -1
  42. package/output/js/ff/core/BrowserSystem.mjs +9 -1
  43. package/output/js/ff/core/Buffer.mjs +8 -8
  44. package/output/js/ff/core/BuildSystem.mjs +9 -1
  45. package/output/js/ff/core/Channel.mjs +1 -1
  46. package/output/js/ff/core/Char.mjs +1 -1
  47. package/output/js/ff/core/Core.mjs +1 -1
  48. package/output/js/ff/core/Crypto.mjs +278 -0
  49. package/output/js/ff/core/Duration.mjs +1 -1
  50. package/output/js/ff/core/Equal.mjs +1 -1
  51. package/output/js/ff/core/Error.mjs +1 -1
  52. package/output/js/ff/core/FileHandle.mjs +1 -1
  53. package/output/js/ff/core/Float.mjs +1 -1
  54. package/output/js/ff/core/HttpClient.mjs +1 -1
  55. package/output/js/ff/core/Instant.mjs +39 -1
  56. package/output/js/ff/core/Int.mjs +1 -1
  57. package/output/js/ff/core/IntMap.mjs +1 -1
  58. package/output/js/ff/core/JsSystem.mjs +1 -1
  59. package/output/js/ff/core/JsValue.mjs +1 -1
  60. package/output/js/ff/core/Json.mjs +1 -1
  61. package/output/js/ff/core/List.mjs +1 -1
  62. package/output/js/ff/core/Lock.mjs +1 -1
  63. package/output/js/ff/core/Log.mjs +1 -1
  64. package/output/js/ff/core/Map.mjs +1 -1
  65. package/output/js/ff/core/NodeSystem.mjs +9 -1
  66. package/output/js/ff/core/Nothing.mjs +1 -1
  67. package/output/js/ff/core/Option.mjs +1 -1
  68. package/output/js/ff/core/Ordering.mjs +1 -1
  69. package/output/js/ff/core/Pair.mjs +1 -1
  70. package/output/js/ff/core/Path.mjs +1 -1
  71. package/output/js/ff/core/Random.mjs +1 -1
  72. package/output/js/ff/core/RbMap.mjs +1 -1
  73. package/output/js/ff/core/Serializable.mjs +1 -1
  74. package/output/js/ff/core/Set.mjs +1 -1
  75. package/output/js/ff/core/Show.mjs +1 -1
  76. package/output/js/ff/core/SourceLocation.mjs +1 -1
  77. package/output/js/ff/core/Stream.mjs +3 -3
  78. package/output/js/ff/core/String.mjs +1 -1
  79. package/output/js/ff/core/StringMap.mjs +1 -1
  80. package/output/js/ff/core/Task.mjs +1 -1
  81. package/output/js/ff/core/Try.mjs +1 -1
  82. package/output/js/ff/core/Unit.mjs +1 -1
  83. package/package.json +27 -27
  84. package/s3/.firefly/package.ff +1 -0
  85. package/s3/S3.ff +93 -0
  86. package/vscode/package.json +1 -1
  87. package/core/Digest.ff +0 -51
  88. package/experimental/s3/S3.ff +0 -126
  89. package/output/js/ff/core/Digest.mjs +0 -190
package/bin/Release.ff CHANGED
@@ -1,12 +1,28 @@
1
+ dependency ff:s3:0.0.0
2
+ import S3 from ff:s3
3
+
1
4
  nodeMain(system: NodeSystem) {
2
- run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
3
- run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
4
- run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
5
- bumpMinorVersion(system, system.path("../package.json"))
6
- bumpMinorVersion(system, system.path("../vscode/package.json"))
7
- run(system, "npm", ["publish"], system.path(".."))
8
- run(system, "vsce", ["publish"], system.path("../vscode"))
9
- // tar gz core etc. and upload to s3
5
+ system.arguments().{
6
+ | [] =>
7
+ | [awsUser, awsKey] =>
8
+ run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
9
+ run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
10
+ run(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
11
+ bumpMinorVersion(system, system.path("../package.json"))
12
+ bumpMinorVersion(system, system.path("../vscode/package.json"))
13
+ //run(system, "npm", ["publish"], system.path(".."))
14
+ //run(system, "vsce", ["publish"], system.path("../vscode"))
15
+ let coreTemporary = system.path("../core/.firefly/temporary")
16
+ if(!coreTemporary.exists()) {coreTemporary.createDirectory()}
17
+ let coreTarGz = coreTemporary.slash("ff_core_0_0_0.tar.gz")
18
+ if(coreTarGz.exists()) {
19
+ coreTarGz.delete()
20
+ system.writeLine("Deleted " + coreTarGz.absolute())
21
+ }
22
+ internalMakeTarGz(coreTarGz, system.path("../core"))
23
+ system.writeLine("Created " + coreTarGz.absolute())
24
+ //S3.put(system, awsUser, awsKey, )
25
+ }
10
26
  }
11
27
 
12
28
  run(system: NodeSystem, command: String, arguments: List[String], workingDirectory: Path) {
@@ -47,3 +63,9 @@ bumpMinorVersion(system: NodeSystem, packageJsonPath: Path) {
47
63
  }
48
64
  packageJsonPath.writeText(newContent)
49
65
  }
66
+
67
+ internalMakeTarGz(tarGzPath: Path, path: Path): Unit
68
+ target node async """
69
+ import * as tar from 'tar'
70
+ await tar.create({gzip: true, file: tarGzPath_}, [path_]);
71
+ """
@@ -66,7 +66,7 @@ coreImports: List[DImport] =
66
66
  "Channel"
67
67
  "Char"
68
68
  "Core"
69
- "Digest"
69
+ "Crypto"
70
70
  "Duration"
71
71
  "Equal"
72
72
  "Error"
@@ -8,6 +8,9 @@ extend self: BrowserSystem {
8
8
  mainTask(): Task
9
9
  target js async "return self_.task_"
10
10
 
11
+ crypto(): Crypto
12
+ target js async "return (typeof globalThis !== 'undefined' ? globalThis : window).crypto"
13
+
11
14
  js(): JsSystem
12
15
  target js async "return typeof globalThis !== 'undefined' ? globalThis : window"
13
16
 
package/core/Buffer.ff CHANGED
@@ -143,10 +143,10 @@ extend self: Buffer {
143
143
 
144
144
  }
145
145
 
146
- fromByteArray(array: List[Int]): Buffer
146
+ fromByteList(array: List[Int]): Buffer
147
147
  target js sync "return new DataView(new Uint8Array(array_).buffer)"
148
148
 
149
- fromBufferArray(array: List[Buffer]): Buffer
149
+ fromBufferList(array: List[Buffer]): Buffer
150
150
  target js sync """
151
151
  let length = 0
152
152
  for(let b of array_) length += b.byteLength
@@ -162,7 +162,7 @@ fromBufferArray(array: List[Buffer]): Buffer
162
162
 
163
163
  fromHex(hex: String): Buffer
164
164
  target js sync """
165
- const hexValues = hexString.match(/.{1,2}/g) || []
165
+ const hexValues = hex_.match(/.{1,2}/g) || []
166
166
  const numbers = hexValues.map(value => parseInt(value, 16))
167
167
  return new DataView(new Uint8Array(numbers).buffer)
168
168
  """
@@ -38,6 +38,9 @@ extend self: BuildSystem {
38
38
  mainTask(): Task
39
39
  target js async "return self_.task_"
40
40
 
41
+ crypto(): Crypto
42
+ target js async "return (typeof globalThis !== 'undefined' ? globalThis : window).crypto"
43
+
41
44
  }
42
45
 
43
46
  extend self: BrowserCode {
package/core/Crypto.ff ADDED
@@ -0,0 +1,102 @@
1
+ capability Crypto {}
2
+
3
+ extend self: Crypto {
4
+
5
+ randomUuid(): String
6
+ target js async """
7
+ return self_.randomUUID();
8
+ """
9
+
10
+ randomBuffer(size: Int): Buffer {
11
+ let buffer = Buffer.new(size)
12
+ self.randomizeBuffer(buffer)
13
+ buffer
14
+ }
15
+
16
+ randomizeBuffer(buffer: Buffer): Unit
17
+ target js async """
18
+ self_.getRandomValues(new Uint8Array(buffer_.buffer, buffer_.byteOffset, buffer_.byteLength));
19
+ """
20
+
21
+ hmacSha256(key: Buffer, buffer: Buffer): Buffer
22
+ target js async """
23
+ const cryptoKey = await self_.subtle.importKey(
24
+ 'raw',
25
+ key_,
26
+ {name: 'HMAC', hash: {name: 'SHA-256'}},
27
+ false,
28
+ ['sign']
29
+ );
30
+ const signature = await self_.subtle.sign(
31
+ 'HMAC',
32
+ cryptoKey,
33
+ buffer_
34
+ );
35
+ return new DataView(signature);
36
+ """
37
+
38
+ sha256(buffer: Buffer): Buffer
39
+ target js async """
40
+ let hash = await self_.subtle.digest('SHA-256', buffer_);
41
+ return new DataView(hash);
42
+ """
43
+
44
+ hashPassword(password: String, iterations: Int = 600000, pepper: String = ""): String {
45
+ let salt = self.randomBuffer(16)
46
+ let hash = internalHashPassword(self, salt, (password + pepper).toBuffer(), iterations)
47
+ "$pbkdf2-sha256$" + iterations + "$" + salt.toHex() + "$" + hash.toHex()
48
+ }
49
+
50
+ checkPassword(
51
+ password: String,
52
+ passwordHash: String,
53
+ pepper: String = "",
54
+ minIterations: Int = 100000,
55
+ maxIterations: Int = 2000000
56
+ ): Bool {
57
+ passwordHash.split('$').{
58
+ | ["", "pbkdf2-sha256", iterationsText, saltText, hashText] {iterationsText.getInt() | Some(iterations)} {
59
+ iterations >= minIterations && iterations <= maxIterations
60
+ } =>
61
+ let computedHash =
62
+ internalHashPassword(self, Buffer.fromHex(saltText), (password + pepper).toBuffer(), iterations)
63
+ let hash = Buffer.fromHex(hashText)
64
+ self.constantTimeEquals(computedHash, hash)
65
+ | _ => False
66
+ }
67
+ }
68
+
69
+ constantTimeEquals(buffer1: Buffer, buffer2: Buffer): Bool {
70
+ if(buffer1.size() != buffer2.size()) {False} else:
71
+ mutable v = 0
72
+ mutable i = 0
73
+ while {i < buffer1.size()} {
74
+ v = v.bitOr(buffer1.grabUint8(i).bitXor(buffer2.grabUint8(i)))
75
+ i += 1
76
+ }
77
+ v == 0
78
+ }
79
+
80
+ }
81
+
82
+ internalHashPassword(system: Crypto, salt: Buffer, password: Buffer, iterations: Int): Buffer
83
+ target js async """
84
+ const keyMaterial = await crypto.subtle.importKey(
85
+ 'raw',
86
+ password_,
87
+ {name: 'PBKDF2'},
88
+ false,
89
+ ['deriveBits']
90
+ );
91
+ const hashBuffer = await crypto.subtle.deriveBits(
92
+ {
93
+ name: 'PBKDF2',
94
+ salt: salt_,
95
+ iterations: iterations_,
96
+ hash: 'SHA-256'
97
+ },
98
+ keyMaterial,
99
+ 256
100
+ );
101
+ return new DataView(hashBuffer);
102
+ """
package/core/Instant.ff CHANGED
@@ -1,9 +1,26 @@
1
1
  newtype Instant(since1970: Duration)
2
2
 
3
+ fromIso(date: String): Option[Instant] {
4
+ let zone = date.endsWith("Z") || date.contains("+") || date.dropWhile {_ != 'T'}.contains("-")
5
+ if(zone && date.takeWhile {_ != 'T'}.contains("-") && date.contains("T") && date.contains(":")) {
6
+ internalParseDate(date)
7
+ }
8
+ }
9
+
3
10
  extend self: Instant {
4
11
 
5
12
  add(duration: Duration): Instant {
6
13
  Instant(Duration(self.since1970.seconds + duration.seconds))
7
14
  }
15
+
16
+ toIso(): String
17
+ target js sync """
18
+ return new Date(self_ * 1000).toISOString();
19
+ """
8
20
 
9
21
  }
22
+
23
+ internalParseDate(date: String): Instant
24
+ target js sync """
25
+ return Date.parse(date_) * 0.001;
26
+ """
@@ -45,6 +45,9 @@ extend self: NodeSystem {
45
45
  mainTask(): Task
46
46
  target js async "return self_.task_"
47
47
 
48
+ crypto(): Crypto
49
+ target js async "return (typeof globalThis !== 'undefined' ? globalThis : window).crypto"
50
+
48
51
  js(): JsSystem
49
52
  target js async "return typeof globalThis !== 'undefined' ? globalThis : window"
50
53
 
package/core/Stream.ff CHANGED
@@ -372,7 +372,7 @@ extend self: Stream[Buffer] {
372
372
  toBuffer(): Buffer {
373
373
  let builder = Array.new()
374
374
  self.each {builder.push(_)}
375
- Buffer.fromBufferArray(builder.drain())
375
+ Buffer.fromBufferList(builder.drain())
376
376
  }
377
377
 
378
378
  toString(encoding: String = "utf8"): String {
@@ -1,12 +1,12 @@
1
1
  main(system: NodeSystem) {
2
- let inBuffers = 1.to(100).map {_ => Buffer.fromByteArray([5, 5, 3, 1, 2].toArray())}
2
+ let inBuffers = 1.to(100).map {_ => Buffer.fromByteList([5, 5, 3, 1, 2].toArray())}
3
3
  let inStream = inBuffers.toStream()
4
4
  let outStream = toRunLength(inStream, 3)
5
5
  printRunLength(outStream)
6
6
  }
7
7
 
8
8
  printRunLength(outStream: Stream[Buffer]) {
9
- let buffer = Buffer.fromBufferArray(outStream.toArray())
9
+ let buffer = Buffer.fromBufferList(outStream.toArray())
10
10
  Log.debug(buffer.toHex())
11
11
  let stack = Stack.make()
12
12
  mutable i = 0
@@ -14,7 +14,7 @@ printRunLength(outStream: Stream[Buffer]) {
14
14
  1.to(buffer.grabUint8(i)).each {_ => stack.push(buffer.grabUint8(i + 1))}
15
15
  i += 2
16
16
  }
17
- Log.debug(Buffer.fromByteArray(stack.drain()).toHex())
17
+ Log.debug(Buffer.fromByteList(stack.drain()).toHex())
18
18
  }
19
19
 
20
20
  toRunLength(stream: Stream[Buffer], bufferSize: Int = 65536): Stream[Buffer] {
@@ -0,0 +1,39 @@
1
+ import S3
2
+
3
+ nodeMain(system: NodeSystem) {
4
+ // Trying to reproduce the result from an example here
5
+ // https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
6
+ let expectedHeader = "AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20130524/us-east-1/s3/aws4_request,SignedHeaders=date;host;x-amz-content-sha256;x-amz-date;x-amz-storage-class,Signature=98ad721746da40c64f1a55b78f14c238d841ea1380cd77a1b5971af0ece108bd"
7
+ let amzDate = "20130524T000000Z" // TODO
8
+ let headerDate = "Fri, 24 May 2013 00:00:00 GMT" // TODO
9
+ let bucket = "examplebucket"
10
+ let body = "Welcome to Amazon S3.".toBuffer()
11
+ let actualHeader = S3.makeS3AuthorizationHeader(
12
+ system = system
13
+ accessKeyId = "AKIAIOSFODNN7EXAMPLE"
14
+ secretAccessKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
15
+ region = "us-east-1"
16
+ bucket = bucket
17
+ encodedKey = S3.encode("test$file.text")
18
+ body = body
19
+ canonicalHeaders = [
20
+ Pair("date", headerDate)
21
+ Pair("host", bucket + ".s3.amazonaws.com")
22
+ Pair("x-amz-date", amzDate)
23
+ Pair("x-amz-content-sha256", system.crypto().sha256(body).toHex())
24
+ Pair("x-amz-storage-class", "REDUCED_REDUNDANCY")
25
+ ]
26
+ amzDate = amzDate
27
+ )
28
+ system.writeLine("")
29
+ system.writeLine("actual : " + actualHeader)
30
+ system.writeLine("")
31
+ system.writeLine("expected: " + expectedHeader)
32
+
33
+ system.writeLine("")
34
+ if(actualHeader == expectedHeader) {
35
+ system.writeLine("Test passed")
36
+ } else {
37
+ system.writeLine("Test failed")
38
+ }
39
+ }
@@ -0,0 +1,16 @@
1
+ import S3
2
+
3
+ nodeMain(system: NodeSystem) {
4
+ S3.put(system,
5
+ accessKeyId = ""
6
+ secretAccessKey = ""
7
+ region = "eu-central-1"
8
+ bucket = "firefly-site"
9
+ objectKey = "tmp/test4"
10
+ "Hello S3 3".toBuffer()
11
+ headers = [
12
+ //Pair("x-amz-storage-class", "REDUCED_REDUNDANCY")
13
+ Pair("Content-Type", "text/plain")
14
+ ]
15
+ )
16
+ }
@@ -158,7 +158,7 @@ parseRequestHeaders(input: Stream[Buffer]): Pair[Map[String, String], Stream[Buf
158
158
  offset += 1
159
159
  }
160
160
  buffers.push(buffer.view(0, offset))
161
- let headers = Buffer.fromBufferArray(buffers.drain()).toString()
161
+ let headers = Buffer.fromBufferList(buffers.drain()).toString()
162
162
  let map = headers.lines().pairs().filter {_.second.size() != 0}.map {| Pair(i, line) =>
163
163
  line.splitFirst(':').else {
164
164
  throw(BadRequestException("Invalid header at line " + i + " '" + line + "'"))
@@ -173,7 +173,7 @@ parseRequestBody(contentLength: Int, input: Stream[Buffer]): Pair[Json, Stream[B
173
173
  } catchAny {error =>
174
174
  throw(BadRequestException("End of input while parsing request body"))
175
175
  } grab()
176
- let body = Buffer.fromBufferArray(bodyPair.first).toString()
176
+ let body = Buffer.fromBufferList(bodyPair.first).toString()
177
177
  let json = Json.read(body).else {
178
178
  throw(BadRequestException("Invalid JSON in request body: " + body))
179
179
  }
@@ -46,7 +46,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
46
46
 
47
47
  import * as ff_core_Core from "../../ff/core/Core.mjs"
48
48
 
49
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
49
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
50
50
 
51
51
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
52
52
 
@@ -46,7 +46,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
46
46
 
47
47
  import * as ff_core_Core from "../../ff/core/Core.mjs"
48
48
 
49
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
49
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
50
50
 
51
51
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
52
52
 
@@ -119,7 +119,7 @@ export function Compiler(emitTarget_, task_, compilerModulePath_, jsOutputPath_,
119
119
  return {emitTarget_, task_, compilerModulePath_, jsOutputPath_, packagePaths_, singleFilePackages_, virtualFiles_, cache_, lspHook_, phaseDurationDelta_, phaseDurations_};
120
120
  }
121
121
 
122
- export const coreImports_ = ff_core_List.List_map(["Any", "Array", "AssetSystem", "Atomic", "Bool", "BrowserSystem", "Buffer", "BuildSystem", "Channel", "Char", "Core", "Digest", "Duration", "Equal", "Error", "FileHandle", "Float", "HttpClient", "Instant", "Int", "IntMap", "Json", "JsValue", "JsSystem", "List", "Lock", "Log", "Map", "NodeSystem", "Nothing", "Option", "Ordering", "Pair", "Path", "Random", "Serializable", "Set", "Show", "SourceLocation", "Stream", "String", "StringMap", "Task", "Try", "Unit"], ((moduleName_) => {
122
+ export const coreImports_ = ff_core_List.List_map(["Any", "Array", "AssetSystem", "Atomic", "Bool", "BrowserSystem", "Buffer", "BuildSystem", "Channel", "Char", "Core", "Crypto", "Duration", "Equal", "Error", "FileHandle", "Float", "HttpClient", "Instant", "Int", "IntMap", "Json", "JsValue", "JsSystem", "List", "Lock", "Log", "Map", "NodeSystem", "Nothing", "Option", "Ordering", "Pair", "Path", "Random", "Serializable", "Set", "Show", "SourceLocation", "Stream", "String", "StringMap", "Task", "Try", "Unit"], ((moduleName_) => {
123
123
  return ff_compiler_Syntax.DImport(ff_compiler_Syntax.Location("<prelude>", 1, 1), moduleName_, ff_compiler_Syntax.PackagePair("ff", "core"), [], moduleName_)
124
124
  }));
125
125
 
@@ -36,7 +36,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
36
36
 
37
37
  import * as ff_core_Core from "../../ff/core/Core.mjs"
38
38
 
39
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
39
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
40
40
 
41
41
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
42
42
 
@@ -24,7 +24,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
24
24
 
25
25
  import * as ff_core_Core from "../../ff/core/Core.mjs"
26
26
 
27
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
27
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
28
28
 
29
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
30
30
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -30,7 +30,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
30
30
 
31
31
  import * as ff_core_Core from "../../ff/core/Core.mjs"
32
32
 
33
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
33
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
34
34
 
35
35
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
36
36
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -34,7 +34,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
34
34
 
35
35
  import * as ff_core_Core from "../../ff/core/Core.mjs"
36
36
 
37
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
37
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
38
38
 
39
39
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
40
40
 
@@ -30,7 +30,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
30
30
 
31
31
  import * as ff_core_Core from "../../ff/core/Core.mjs"
32
32
 
33
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
33
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
34
34
 
35
35
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
36
36
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -30,7 +30,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
30
30
 
31
31
  import * as ff_core_Core from "../../ff/core/Core.mjs"
32
32
 
33
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
33
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
34
34
 
35
35
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
36
36
 
@@ -50,7 +50,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
50
50
 
51
51
  import * as ff_core_Core from "../../ff/core/Core.mjs"
52
52
 
53
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
53
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
54
54
 
55
55
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
56
56
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -32,7 +32,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
32
32
 
33
33
  import * as ff_core_Core from "../../ff/core/Core.mjs"
34
34
 
35
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
35
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
36
36
 
37
37
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
38
38
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -28,7 +28,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
28
28
 
29
29
  import * as ff_core_Core from "../../ff/core/Core.mjs"
30
30
 
31
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
31
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
32
32
 
33
33
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
34
34
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -24,7 +24,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
24
24
 
25
25
  import * as ff_core_Core from "../../ff/core/Core.mjs"
26
26
 
27
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
27
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
28
28
 
29
29
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
30
30
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -30,7 +30,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
30
30
 
31
31
  import * as ff_core_Core from "../../ff/core/Core.mjs"
32
32
 
33
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
33
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
34
34
 
35
35
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
36
36
 
@@ -28,7 +28,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
28
28
 
29
29
  import * as ff_core_Core from "../../ff/core/Core.mjs"
30
30
 
31
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
31
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
32
32
 
33
33
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
34
34
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -26,7 +26,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
26
26
 
27
27
  import * as ff_core_Core from "../../ff/core/Core.mjs"
28
28
 
29
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
29
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
30
30
 
31
31
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
32
32
 
@@ -22,7 +22,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
22
22
 
23
23
  import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
25
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
27
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
28
 
@@ -22,7 +22,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
22
22
 
23
23
  import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
25
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
27
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
28
 
@@ -22,7 +22,7 @@ import * as ff_core_Char from "../../ff/core/Char.mjs"
22
22
 
23
23
  import * as ff_core_Core from "../../ff/core/Core.mjs"
24
24
 
25
- import * as ff_core_Digest from "../../ff/core/Digest.mjs"
25
+ import * as ff_core_Crypto from "../../ff/core/Crypto.mjs"
26
26
 
27
27
  import * as ff_core_Duration from "../../ff/core/Duration.mjs"
28
28