summaryrefslogtreecommitdiff
path: root/tests/unit_node/crypto/crypto_cipher_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_node/crypto/crypto_cipher_test.ts')
-rw-r--r--tests/unit_node/crypto/crypto_cipher_test.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/unit_node/crypto/crypto_cipher_test.ts b/tests/unit_node/crypto/crypto_cipher_test.ts
index d22028624..ab8bb4d37 100644
--- a/tests/unit_node/crypto/crypto_cipher_test.ts
+++ b/tests/unit_node/crypto/crypto_cipher_test.ts
@@ -256,3 +256,25 @@ Deno.test({
);
},
});
+
+Deno.test({
+ name: "getCiphers",
+ fn() {
+ assertEquals(crypto.getCiphers().includes("aes-128-cbc"), true);
+ },
+});
+
+Deno.test({
+ name: "getCipherInfo",
+ fn() {
+ const info = crypto.getCipherInfo("aes-128-cbc")!;
+ assertEquals(info.name, "aes-128-cbc");
+ assertEquals(info.keyLength, 16);
+ assertEquals(info.ivLength, 16);
+
+ const info2 = crypto.getCipherInfo("aes128")!;
+ assertEquals(info2.name, "aes-128-cbc");
+ assertEquals(info2.keyLength, 16);
+ assertEquals(info2.ivLength, 16);
+ },
+});