Liking cljdoc? Tell your friends :D

hara.security.cipher


decryptclj

(decrypt bytes key)
(decrypt bytes key {:keys [algorithm params random iv] :as opts})

decrypts a byte array using a key

(-> (decrypt (encode/from-hex "30491ab4427e45909f3d2f5d600b0f93") {:type "AES", :mode :secret, :format "RAW", :encoded "euHlt5sHWhRpbKZHjrwrrQ=="}) (String.)) => "hello world"

decrypts a byte array using a key

 (-> (decrypt (encode/from-hex  "30491ab4427e45909f3d2f5d600b0f93")
              {:type "AES",
               :mode :secret,
               :format "RAW",
               :encoded "euHlt5sHWhRpbKZHjrwrrQ=="})
     (String.))
=> "hello world"
raw docstring

encryptclj

(encrypt bytes key)
(encrypt bytes key {:keys [algorithm params random iv] :as opts})

encrypts a byte array using a key

(-> (encrypt (.getBytes "hello world") {:type "AES", :mode :secret, :format "RAW", :encoded "euHlt5sHWhRpbKZHjrwrrQ=="}) (encode/to-hex)) => "30491ab4427e45909f3d2f5d600b0f93"

encrypts a byte array using a key

 (-> (encrypt (.getBytes "hello world")
              {:type "AES",
               :mode :secret,
               :format "RAW",
               :encoded "euHlt5sHWhRpbKZHjrwrrQ=="})
     (encode/to-hex))
=> "30491ab4427e45909f3d2f5d600b0f93"
raw docstring

init-cipherclj

(init-cipher cipher mode key {:keys [params random iv]})

initializes cipher according to options

initializes cipher according to options
raw docstring

operateclj

(operate mode bytes key {:keys [algorithm] :as opts})

base function for encrypt and decrypt

base function for encrypt and decrypt
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close