Skip to content

Commit

Permalink
chore: 🤖 update
Browse files Browse the repository at this point in the history
  • Loading branch information
RSoraM committed Dec 8, 2024
1 parent 52e1169 commit 7df8f84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cipher/pkcs/ecc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ interface FpECCrypto {
* @param {Uint8Array} [config.iv] - 初始化向量 / Initialization Vector (default: Uint8Array(cipher.BLOCK_SIZE))
*/
export function defineECIES(config?: ECIESConfig) {
config = config ?? {}
const {
cipher = cbc(aes(256)),
mac = hmac(sha256),
kdf = x963kdf(sha256),
S1 = new Uint8Array(0),
S2 = new Uint8Array(0),
iv = new Uint8Array(cipher.BLOCK_SIZE),
} = config ?? {}
} = config
return { cipher, mac, kdf, S1, S2, iv }
}

Expand Down

0 comments on commit 7df8f84

Please sign in to comment.