Add subscription support + license extension on renewal

This commit is contained in:
Krystie
2026-08-19 12:45:06 -07:00
parent 14d0eaa2b3
commit ff722aa4d8
2075 changed files with 357707 additions and 63 deletions
+27
View File
@@ -0,0 +1,27 @@
import * as crypto from 'crypto';
import { CryptoProvider } from './CryptoProvider.js';
/**
* `CryptoProvider which uses the Node `crypto` package for its computations.
*/
export class NodeCryptoProvider extends CryptoProvider {
/** @override */
computeHMACSignature(payload, secret) {
return crypto
.createHmac('sha256', secret)
.update(payload, 'utf8')
.digest('hex');
}
/** @override */
async computeHMACSignatureAsync(payload, secret) {
const signature = await this.computeHMACSignature(payload, secret);
return signature;
}
/** @override */
async computeSHA256Async(data) {
return new Uint8Array(await crypto
.createHash('sha256')
.update(data)
.digest());
}
}
//# sourceMappingURL=NodeCryptoProvider.js.map