Skip to content

Commit

Permalink
eb5c69b2351f5695f8a1461ac5fde153a7de747f
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 7, 2024
1 parent f59f618 commit c8a82c6
Show file tree
Hide file tree
Showing 16 changed files with 628 additions and 686 deletions.
2 changes: 1 addition & 1 deletion esm/0_deps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.221.0/encodin
import { contentType as contentType_ } from "./deps/deno.land/std@0.221.0/media_types/content_type.js";
export declare const contentType: typeof contentType_;
export declare function extension(mimeType: string): string;
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
export { ctr256, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.4.0/mod.js";
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/mod.js";
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
2 changes: 1 addition & 1 deletion esm/0_deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export function extension(mimeType) {
return extension_(mimeType) || "unknown";
}
}
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
export { ctr256, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.4.0/mod.js";
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/mod.js";
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
4 changes: 2 additions & 2 deletions esm/client/0_markdown.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright (c) 2023 Dunkan
* Copyright (c) 2024 Roj
* Copyright (C) 2023 Dunkan
* Copyright (C) 2024 Roj
*/
import { unreachable } from "../0_deps.js";
import { sortMessageEntities } from "../3_types.js";
Expand Down
324 changes: 0 additions & 324 deletions esm/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ export declare function cbc256Encrypt(data: Uint8Array, key: Uint8Array, iv: Uin
* @param iv 16-byte initialization vector
*/
export declare function cbc256Decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array;
export declare function factorize(pq: bigint): [bigint, bigint];
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,3 @@ export function cbc256Decrypt(data, key, iv) {
module_._free(datap);
}
}
export function factorize(pq) {
const pqp = module_._malloc(16);
module_.ccall("factorize", "void", ["number", "pointer"], [pq, pqp]);
try {
const pqp_ = module_.HEAP64.slice(pqp / 8, pqp / 8 + 2);
return [pqp_[0], pqp_[1]];
}
finally {
module_._free(pqp);
}
}
308 changes: 308 additions & 0 deletions esm/deps/deno.land/x/tgcrypto@0.4.0/tgcrypto.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion script/0_deps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.221.0/encodin
import { contentType as contentType_ } from "./deps/deno.land/std@0.221.0/media_types/content_type.js";
export declare const contentType: typeof contentType_;
export declare function extension(mimeType: string): string;
export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
export { ctr256, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.4.0/mod.js";
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/mod.js";
export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
5 changes: 2 additions & 3 deletions script/0_deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parser = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256 = exports.extension = exports.contentType = exports.encodeBase64 = exports.decodeBase64 = exports.path = void 0;
exports.Parser = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.ctr256 = exports.extension = exports.contentType = exports.encodeBase64 = exports.decodeBase64 = exports.path = void 0;
// connection/1_connection_tcp.ts must be updated too when updating std.
__exportStar(require("./deps/deno.land/std@0.221.0/assert/mod.js"), exports);
exports.path = __importStar(require("./deps/deno.land/std@0.221.0/path/mod.js"));
Expand All @@ -53,9 +53,8 @@ function extension(mimeType) {
}
}
exports.extension = extension;
var mod_js_1 = require("./deps/deno.land/x/tgcrypto@0.3.3/mod.js");
var mod_js_1 = require("./deps/deno.land/x/tgcrypto@0.4.0/mod.js");
Object.defineProperty(exports, "ctr256", { enumerable: true, get: function () { return mod_js_1.ctr256; } });
Object.defineProperty(exports, "factorize", { enumerable: true, get: function () { return mod_js_1.factorize; } });
Object.defineProperty(exports, "ige256Decrypt", { enumerable: true, get: function () { return mod_js_1.ige256Decrypt; } });
Object.defineProperty(exports, "ige256Encrypt", { enumerable: true, get: function () { return mod_js_1.ige256Encrypt; } });
Object.defineProperty(exports, "initTgCrypto", { enumerable: true, get: function () { return mod_js_1.init; } });
Expand Down
4 changes: 2 additions & 2 deletions script/client/0_markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseMarkdown = exports.CODEPOINTS = void 0;
/**
* Copyright (c) 2023 Dunkan
* Copyright (c) 2024 Roj
* Copyright (C) 2023 Dunkan
* Copyright (C) 2024 Roj
*/
const _0_deps_js_1 = require("../0_deps.js");
const _3_types_js_1 = require("../3_types.js");
Expand Down
326 changes: 0 additions & 326 deletions script/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ export declare function cbc256Encrypt(data: Uint8Array, key: Uint8Array, iv: Uin
* @param iv 16-byte initialization vector
*/
export declare function cbc256Decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array;
export declare function factorize(pq: bigint): [bigint, bigint];
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.factorize = exports.cbc256Decrypt = exports.cbc256Encrypt = exports.ctr256 = exports.ige256Decrypt = exports.ige256Encrypt = exports.init = void 0;
exports.cbc256Decrypt = exports.cbc256Encrypt = exports.ctr256 = exports.ige256Decrypt = exports.ige256Encrypt = exports.init = void 0;
const tgcrypto_js_1 = __importDefault(require("./tgcrypto.js"));
// deno-lint-ignore no-explicit-any
let module_;
Expand Down Expand Up @@ -163,15 +163,3 @@ function cbc256Decrypt(data, key, iv) {
}
}
exports.cbc256Decrypt = cbc256Decrypt;
function factorize(pq) {
const pqp = module_._malloc(16);
module_.ccall("factorize", "void", ["number", "pointer"], [pq, pqp]);
try {
const pqp_ = module_.HEAP64.slice(pqp / 8, pqp / 8 + 2);
return [pqp_[0], pqp_[1]];
}
finally {
module_._free(pqp);
}
}
exports.factorize = factorize;
310 changes: 310 additions & 0 deletions script/deps/deno.land/x/tgcrypto@0.4.0/tgcrypto.js

Large diffs are not rendered by default.

0 comments on commit c8a82c6

Please sign in to comment.