generated from cubetiq/ts-project
Updated build
This commit is contained in:
parent
fb694eb5a2
commit
f071f99346
4
dist/crypto/core/default.crypto.d.ts
vendored
4
dist/crypto/core/default.crypto.d.ts
vendored
@ -9,4 +9,6 @@ declare const decrypt: (
|
||||
key: string | Buffer,
|
||||
iv?: string | Buffer | null | undefined
|
||||
) => string
|
||||
export { encrypt, decrypt }
|
||||
declare const cryptoRandomBytes: (length: number) => Buffer
|
||||
declare const cryptoRandomString: (length: number) => string
|
||||
export { encrypt, decrypt, cryptoRandomBytes, cryptoRandomString }
|
||||
|
14
dist/crypto/core/default.crypto.js
vendored
14
dist/crypto/core/default.crypto.js
vendored
@ -43,7 +43,11 @@ var __importStar =
|
||||
return result
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true })
|
||||
exports.decrypt = exports.encrypt = void 0
|
||||
exports.cryptoRandomString =
|
||||
exports.cryptoRandomBytes =
|
||||
exports.decrypt =
|
||||
exports.encrypt =
|
||||
void 0
|
||||
var crypto = __importStar(require("crypto"))
|
||||
var config_1 = require("../../config")
|
||||
var util_1 = require("../../util")
|
||||
@ -79,4 +83,12 @@ var decrypt = function (data, key, iv) {
|
||||
return decrypted
|
||||
}
|
||||
exports.decrypt = decrypt
|
||||
var cryptoRandomBytes = function (length) {
|
||||
return Buffer.from(crypto.randomBytes(length))
|
||||
}
|
||||
exports.cryptoRandomBytes = cryptoRandomBytes
|
||||
var cryptoRandomString = function (length) {
|
||||
return cryptoRandomBytes(length).toString(config_1.DEFAULT_BUFFER_TYPE)
|
||||
}
|
||||
exports.cryptoRandomString = cryptoRandomString
|
||||
//# sourceMappingURL=default.crypto.js.map
|
||||
|
2
dist/crypto/core/default.crypto.js.map
vendored
2
dist/crypto/core/default.crypto.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"default.crypto.js","sourceRoot":"","sources":["../../../src/crypto/core/default.crypto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgC;AAChC,uCAIqB;AACrB,mCAA2D;AAE3D,IAAM,OAAO,GAAG,UACZ,IAAqB,EACrB,GAAoB,EACpB,EAA2B;IAE3B,IAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAChC,8BAAqB,EACrB,IAAA,qBAAc,EAAC,GAAG,CAAC,EACnB,IAAA,qBAAc,EAAC,EAAE,IAAI,GAAG,CAAC,CAC5B,CAAA;IACD,IAAM,KAAK,GAAG,IAAA,qBAAc,EAAC,IAAI,CAAC,CAAA;IAClC,IAAI,SAAS,GAAG,MAAM,CAAC,MAAM,CACzB,KAAK,EACL,8BAAqB,EACrB,4BAAmB,CACtB,CAAA;IACD,SAAS,IAAI,MAAM,CAAC,KAAK,CAAC,4BAAmB,CAAC,CAAA;IAC9C,OAAO,SAAS,CAAA;AACpB,CAAC,CAAA;AAsBQ,0BAAO;AApBhB,IAAM,OAAO,GAAG,UACZ,IAAqB,EACrB,GAAoB,EACpB,EAA2B;IAE3B,IAAM,QAAQ,GAAG,MAAM,CAAC,gBAAgB,CACpC,8BAAqB,EACrB,IAAA,qBAAc,EAAC,GAAG,CAAC,EACnB,IAAA,qBAAc,EAAC,EAAE,IAAI,GAAG,CAAC,CAC5B,CAAA;IACD,IAAM,KAAK,GAAG,IAAA,qBAAc,EAAC,IAAI,CAAC,CAAA;IAClC,IAAI,SAAS,GAAG,QAAQ,CAAC,MAAM,CAC3B,KAAK,EACL,4BAAmB,EACnB,8BAAqB,CACxB,CAAA;IACD,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,8BAAqB,CAAC,CAAA;IAClD,OAAO,SAAS,CAAA;AACpB,CAAC,CAAA;AAEiB,0BAAO"}
|
||||
{"version":3,"file":"default.crypto.js","sourceRoot":"","sources":["../../../src/crypto/core/default.crypto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgC;AAChC,uCAIqB;AACrB,mCAA2D;AAE3D,IAAM,OAAO,GAAG,UACZ,IAAqB,EACrB,GAAoB,EACpB,EAA2B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