All Projects → g4s8 → cactoos-crypto

g4s8 / cactoos-crypto

Licence: MIT license
Crypto extensions for Cactoos library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to cactoos-crypto

elegantobjects
Supplementary materials for "Elegant Objects" book
Stars: ✭ 23 (+53.33%)
Mutual labels:  oop, oop-principles
kactoos
General-purpose collection of OOP primitives for Kotlin
Stars: ✭ 19 (+26.67%)
Mutual labels:  oop, oop-principles
cactoos-matchers
Elegant object-oriented hamcrest matchers
Stars: ✭ 30 (+100%)
Mutual labels:  oop, cactoos
design-patterns
Simple examples of Design Patterns with PHP Examples
Stars: ✭ 75 (+400%)
Mutual labels:  oop, oop-principles
Vert-Core
ServiceContainer for Vue to build Vue applications in OOP.
Stars: ✭ 20 (+33.33%)
Mutual labels:  oop, oop-principles
final-class
🔒 Final classes for Python3!
Stars: ✭ 17 (+13.33%)
Mutual labels:  oop, oop-principles
The-Ruby-Workshop
A New, Interactive Approach to Learning Ruby
Stars: ✭ 26 (+73.33%)
Mutual labels:  oop, oop-principles
spring-SOLID
Spring 예제로 보는 SOLID
Stars: ✭ 53 (+253.33%)
Mutual labels:  oop, oop-principles
OOP-JavaScript
Learn OOP JavaScript ⚡
Stars: ✭ 23 (+53.33%)
Mutual labels:  oop, oop-principles
OOP-In-CPlusPlus
An Awesome Repository On Object Oriented Programming In C++ Language. Ideal For Computer Science Undergraduates, This Repository Holds All The Resources Created And Used By Me - Code & Theory For One To Master Object Oriented Programming. Filled With Theory Slides, Number Of Programs, Concept-Clearing Projects And Beautifully Explained, Well Doc…
Stars: ✭ 27 (+80%)
Mutual labels:  oop, oop-principles
Unifiedtransform
A school management Software
Stars: ✭ 2,248 (+14886.67%)
Mutual labels:  oop
Object Oriented Programming Using Python
Python is a multi-paradigm programming language. Meaning, it supports different programming approach. One of the popular approach to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).
Stars: ✭ 183 (+1120%)
Mutual labels:  oop
Logtalk3
Logtalk - declarative object-oriented logic programming language
Stars: ✭ 221 (+1373.33%)
Mutual labels:  oop
awesome-software-architecture
A curated list of awesome articles, videos, and other resources to learn and practice software architecture, patterns, and principles.
Stars: ✭ 1,594 (+10526.67%)
Mutual labels:  oop
Software Engineer Interview Questions
A lot of questions and links to prepare yourself for an interview.
Stars: ✭ 176 (+1073.33%)
Mutual labels:  oop
Aquila
🎨 An Advanced WordPress theme
Stars: ✭ 204 (+1260%)
Mutual labels:  oop
You Don T Know Oop
Знаете ли вы ооп?
Stars: ✭ 170 (+1033.33%)
Mutual labels:  oop
Ploop
Prototype Lua object-oriented program system, with many modern features like attribute, overload, etc. For Lua 5.1 or above, include luajit
Stars: ✭ 163 (+986.67%)
Mutual labels:  oop
Lw oopc
modified from http://sourceforge.net/projects/lwoopc/
Stars: ✭ 159 (+960%)
Mutual labels:  oop
wordpress-eloquent
A library that converts converts wordpress tables into Laravel Eloquent Models.
Stars: ✭ 129 (+760%)
Mutual labels:  oop

WARNING

It was an experiment repository, it contains POC library code. It's not producation ready. It'll be not supported.


cactoos-crypto

EO principles respected here Managed by Zerocracy DevOps By Rultor.com

Bintray Build Status PDD status License Test Coverage

Cryptography extensions for Cactoos library.

Cipher as input/output

To encrypt/decrypt an input:

final Scalar<Cipher> cipher = new CipherFrom(
    "AES/CBC/PKCS5Padding",
    new CipherSpec(key, iv)
);
final Input encrypted = new CryptoInput.Enc(
  new InputOf(file),
  cipher
);
final Input decrypted = new CryptoInput.Dec(
  encrypted,
  cipher
);

To encrypt/decrypt an output:

final Scalar<Cipher> cipher = new CipherFrom(
    "AES/CBC/PKCS5Padding",
    new CipherSpec(key, iv)
);
final Output decrypting = new CryptoOutput.Dec(
  new OutputTo(file),
  cipher
);
final Output encrypting = new CryptoOutput.Enc(
  decrypting,
  cipher
);

MAC (Message Authentication Code) as Bytes:

To compute MAC of input:

final Bytes hmac = new MacOf(
  new InputOf(file),
  new MacFrom(
    "HmacSHA256",
    new MacSpec(key)
  )
);

MessageDigest as Bytes:

To compute message-digest of input:

final Bytes digest = new DigestOf(
  new InputOf(file),
  new DigestFrom("SHA-256")
);

Install

mvn:

<dependency>
  <groupId>com.g4s8</groupId>
  <artifactId>cryptocactoos</artifactId>
</dependency>

gradle:

  "com.g4s8:cryptocactoos:<vesion>"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].