mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-09-26 20:41:45 +00:00
v3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
deriveKey, generateKey, encrypt, randomBytes,
|
||||
bytesToHex, encode,
|
||||
bytesToHex, encode, compress,
|
||||
create as apiCreate,
|
||||
type FileDTO, type ServerNote
|
||||
} from '@cryptgeon/shared'
|
||||
@@ -131,7 +131,12 @@
|
||||
inner = encode({ type: 'text', data: textContent })
|
||||
}
|
||||
|
||||
const data = encrypt(inner, key)
|
||||
const originalSize =inner.byteLength
|
||||
const compressed = compress(inner)
|
||||
const compresseedSize= compressed.byteLength
|
||||
console.debug({originalSize, compresseedSize, ratio: originalSize/compresseedSize})
|
||||
|
||||
const data = encrypt(compress(inner), key)
|
||||
const extra = customPassword
|
||||
? encode({ salt: salt!, N: 32768, r: 8, p: 1 })
|
||||
: new Uint8Array()
|
||||
@@ -281,4 +286,4 @@
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user