sjcl

Crates.iosjcl
lib.rssjcl
version1.0.0
sourcesrc
created_at2021-03-28 15:07:20.9787
updated_at2021-05-22 12:21:56.125749
descriptionLibrary which supports decrypting data that was encrypted using SJCL
homepagehttps://github.com/Milchdealer/sjcl-rust
repositoryhttps://github.com/Milchdealer/sjcl-rust
max_upload_size
id374691
size32,185
Jannik (Milchdealer)

documentation

README

sjcl-rust

Library which supports decrypting and encrypting SJCL compatible blocks.

Features

  • Encryption & Decryption
  • Key sizes between 128- to 256-bit
  • AES-CCM
  • ⚠️ AES-OCB2 is deprecated and not supported

Usage

use sjcl::decrypt_raw;

let data = "{\"iv\":\"nJu7KZF2eEqMv403U2oc3w==\", \"v\":1, \"iter\":10000, \"ks\":256, \"ts\":64, \"mode\":\"ccm\", \"adata\":\"\", \"cipher\":\"aes\", \"salt\":\"mMmxX6SipEM=\", \"ct\":\"VwnKwpW1ah5HmdvwuFBthx0=\"}".to_string();
let password_phrase = "abcdefghi".to_string();

let plaintext = String::from_utf8(decrypt_json(data, password_phrase, None).unwrap())?;
Commit count: 10

cargo fmt