server-ts: services/encryption/*.js -> ts

This commit is contained in:
Elian Doran
2024-02-16 23:03:19 +02:00
parent dc359b2a74
commit c20d2273e6
6 changed files with 42 additions and 43 deletions

View File

@@ -41,7 +41,7 @@ function hashedBlobId(content: string) {
return kindaBase62Hash.substr(0, 20);
}
function toBase64(plainText: string) {
function toBase64(plainText: string | Buffer) {
return Buffer.from(plainText).toString('base64');
}
@@ -311,7 +311,7 @@ function isString(x: any) {
return Object.prototype.toString.call(x) === "[object String]";
}
module.exports = {
export = {
randomSecureToken,
randomString,
md5,