Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🔐 Fast crypto library for Deno written in pure Typescript. AES, Blowfish, CAST5, DES, 3DES, HMAC, HKDF, PBKDF2

License

NotificationsYou must be signed in to change notification settings

aykxt/crypto

Repository files navigation

A collection of useful cryptographic algorithms written in Typescript.


🧪This project is still in an early stage of development. Expect breakingchanges.


✔ Supported algorithms

Message Authentication Code algorithms (MACs)

📝 Examples

AES-128-CBC

import{Aes}from"https://deno.land/x/crypto/aes.ts";import{Cbc,Padding}from"https://deno.land/x/crypto/block-modes.ts";constte=newTextEncoder();constkey=te.encode("SuperDuperSecret");constdata=te.encode("DataToBeEncrypted");constiv=newUint8Array(16);// Ciphers have an internal state, you should therefore create// separate ciphers for encryption and decryptionconstcipher=newCbc(Aes,key,iv,Padding.PKCS7);constdecipher=newCbc(Aes,key,iv,Padding.PKCS7);constencrypted=cipher.encrypt(data);constdecrypted=decipher.decrypt(encrypted);

🔔 Disclaimer

This repository has not yet received any formal cryptographic and securityreviews.USE AT YOUR OWN RISK


[8]ページ先頭

©2009-2025 Movatter.jp