Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Oct 19, 2023
1 parent 67a8ed0 commit b57960c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ ctr-256 (encrypt, 1MB)
├─noble-webcrypto x 4,589 ops/sec @ 217μs/op
└─noble x 107 ops/sec @ 9ms/op
==== cbc-256 ====
cbc-256 (encrypt, 1MB)
├─node x 993 ops/sec @ 1ms/op
├─stablelib x 63 ops/sec @ 15ms/op
Expand Down
12 changes: 6 additions & 6 deletions benchmark/aes.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const CIPHERS = {
encrypt: (buf, opts) => new aesjs.ModeOfOperation.ctr(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => new aesjs.ModeOfOperation.ctr(opts.key, opts.iv).decrypt(buf),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.ctr(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.ctr(opts.key, opts.iv).decrypt(buf),
},
Expand All @@ -179,7 +179,7 @@ export const CIPHERS = {
encrypt: (buf, opts) => new aesjs.ModeOfOperation.ctr(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => new aesjs.ModeOfOperation.ctr(opts.key, opts.iv).decrypt(buf),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.ctr(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.ctr(opts.key, opts.iv).decrypt(buf),
},
Expand All @@ -198,7 +198,7 @@ export const CIPHERS = {
decrypt: (buf, opts) =>
aesjs.padding.pkcs7.strip(new aesjs.ModeOfOperation.cbc(opts.key, opts.iv).decrypt(buf)),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.cbc(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.cbc(opts.key, opts.iv).decrypt(buf),
},
Expand All @@ -217,7 +217,7 @@ export const CIPHERS = {
decrypt: (buf, opts) =>
aesjs.padding.pkcs7.strip(new aesjs.ModeOfOperation.cbc(opts.key, opts.iv).decrypt(buf)),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.cbc(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.cbc(opts.key, opts.iv).decrypt(buf),
},
Expand Down Expand Up @@ -313,7 +313,7 @@ export const CIPHERS = {
encrypt: (buf, opts) => new STABLE_GCM(new STABLE_AES(opts.key)).seal(opts.iv, buf),
decrypt: (buf, opts) => new STABLE_GCM(new STABLE_AES(opts.key)).open(opts.iv, buf),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.gcm(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.gcm(opts.key, opts.iv).decrypt(buf),
},
Expand All @@ -329,7 +329,7 @@ export const CIPHERS = {
encrypt: (buf, opts) => new STABLE_GCM(new STABLE_AES(opts.key)).seal(opts.iv, buf),
decrypt: (buf, opts) => new STABLE_GCM(new STABLE_AES(opts.key)).open(opts.iv, buf),
},
nobleOld: {
'noble-webcrypto': {
encrypt: (buf, opts) => webcrypto.gcm(opts.key, opts.iv).encrypt(buf),
decrypt: (buf, opts) => webcrypto.gcm(opts.key, opts.iv).decrypt(buf),
},
Expand Down

0 comments on commit b57960c

Please sign in to comment.