stream_cipher 1.1.0 copy "stream_cipher: ^1.1.0" to clipboard
stream_cipher: ^1.1.0 copied to clipboard

outdated

A library to encrypt and decrypt ByteLists and ByteLists Streams initially comes with DioHttpClientAdapter

Stream Cipher #

this package commonly used to encrypt/decrypt data in stream form (e.g. HTTP, IO,etc)

this package initially comes with a http client adapter for Dio library.

the following code snippet shows how to use the adapter:

// this will create a `AESByteDataEncrypter` with random secure key
final encrypter = AESByteDataEncrypter.randomSecureKey();
// pass the key generated in the previous step to the `AESByteDataDecrypter` to create a decrypter instance with the same key
final decrypter = AESByteDataDecrypter(
       key: encrypter.key, 
       iv:encrypter.iv,
   );
/// create instance of `CipherDioHttpAdapter` with created encrypter and decrypter
final dioClient = CipherDioHttpAdapter(
     decrypter: decrypter,
     encrypter: encrypter,
   );
/// creating an instance of `Dio` with `CipherDioHttpAdapter`
final dio = Dio()..httpClientAdapter = dioClient;

1.in this method only the body of the request is encrypted.

2.in this method only the body of the response is decrypted.

3.the header of request is not encrypted. to deform the header of request, you can extend one of IByteDataEncrypters and override the alterHeader method to do so.

for backend side you can check example of this project

2
likes
0
points
30
downloads

Publisher

verified publisherhemend.com

Weekly Downloads

A library to encrypt and decrypt ByteLists and ByteLists Streams initially comes with DioHttpClientAdapter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, encrypt, pointycastle

More

Packages that depend on stream_cipher