Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

crypto: use buffer from node:buffer

Abdullah Atta1190da7c915d
diff --git a/packages/crypto/src/encryption.ts b/packages/crypto/src/encryption.ts
index 44967f70f..2279b4f58 100644
--- a/packages/crypto/src/encryption.ts
+++ b/packages/crypto/src/encryption.ts
@@ -35,7 +35,6 @@ import { Chunk, Cipher, OutputFormat, Plaintext, SerializedKey } from "./types";
const encoder = new TextEncoder();
export default class Encryption {
private static transformInput(plaintext: Plaintext): Uint8Array {
- console.log(base64_variants);
let data: Uint8Array | null = null;
if (typeof plaintext.data === "string" && plaintext.format === "base64") {
data = from_base64(plaintext.data, base64_variants.ORIGINAL);
diff --git a/packages/sodium/src/node.ts b/packages/sodium/src/node.ts
index e18b00180..af8630a66 100644
--- a/packages/sodium/src/node.ts
+++ b/packages/sodium/src/node.ts
@@ -35,7 +35,7 @@ import {
crypto_secretstream_xchacha20poly1305_STATEBYTES,
crypto_secretstream_xchacha20poly1305_TAGBYTES
} from "sodium-native";
-import { Buffer } from "buffer";
+import { Buffer } from "node:buffer";
export type Uint8ArrayOutputFormat = "uint8array";
export type StringOutputFormat = "text" | "hex" | "base64";