bc-clj
Clojure wrapper for Bouncy Castle
Usage
The library lives under bouncycastle
and is divided into the following namespaces and functions:
digest/
Digests such as gost3411
, md2
, md4
, md5
, ripemd128
, ripemd160
, ripemd256
, ripemd320
, sha1
, sha224
, sha256
, sha384
, sha512
, sha3
, tiger
, whirepool
. All functions expect an byte-array as input and return a new byte-array as output. Have a look at the tests to see how these functions work.
hmac/
HMAC implementation based on the digests defined above. Again all functions operate on byte-arrays. Take a look at the tests for details.
encoding/
Provides functions to encode byte-arrays into a hex
- or base64
string.
key-generator/
Provides (generate-key)
to generate a symmetric key and (generate-keypair)
to generate a public/private key-pair. Both need an algorithm name and optionally the key-strength in bit and optionally a source of randomness. The tests show how to use the function.
Integration
Maven
<dependencies>
<dependency>
<groupId>com.github.sebhoss</groupId>
<artifactId>bc-clj</artifactId>
<version>[2.0.0,3.0.0)</version>
</dependency>
</dependencies>
Leiningen
[com.github.sebhoss/bc-clj "[2.0.0,3.0.0)"]
License
This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
Alternatives
In case you’re looking for something else, try: