mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore:
This commit is contained in:
@@ -2,8 +2,8 @@ import crypto from 'crypto';
|
||||
|
||||
export class Encryptor {
|
||||
secretKey: Buffer;
|
||||
constructor(encryptSecret: string) {
|
||||
this.secretKey = Buffer.from(encryptSecret, 'base64');
|
||||
constructor(encryptSecret: string, encoding: BufferEncoding = 'base64') {
|
||||
this.secretKey = Buffer.from(encryptSecret, encoding);
|
||||
}
|
||||
// 加密函数
|
||||
encrypt(text: string) {
|
||||
|
||||
Reference in New Issue
Block a user