Skip to content

Commit

Permalink
Create index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 8, 2024
1 parent 67a10c7 commit b26a245
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { LatticeBasedCrypto } = require('./lattice_based_crypto');
const { HashBasedSignatures } = require('./hash_based_signatures');

class QuantumResistance {
async encrypt(data) {
const latticeBasedCrypto = new LatticeBasedCrypto();
return latticeBasedCrypto.encrypt(data);
}

async decrypt(encryptedData) {
const latticeBasedCrypto = new LatticeBasedCrypto();
return latticeBasedCrypto.decrypt(encryptedData);
}

async sign(data) {
const hashBasedSignatures = new HashBasedSignatures();
return hashBasedSignatures.sign(data);
}

async verify(signature, data) {
const hashBasedSignatures = new HashBasedSignatures();
return hashBasedSignatures.verify(signature, data);
}
}

module.exports = QuantumResistance;

0 comments on commit b26a245

Please sign in to comment.