 "f5B7ECxK0kdmXPXIEBiizYACIQD2x39Q4oVwO5uL6m3AVNI98C2LZWa0g2iea8wk"
 "BAHpeA=="
 "-----END CERTIFICATE-----"))
+
+  (= (hash test-msg {:algorithm :sha256}) hash-msg-sha256)
+  (= (hash test-long-msg {:algorithm :sha256}) hash-long-msg-sha256)
+  (= (hash test-msg {:algorithm :sha384}) hash-msg-sha384)
+  (= (hash test-long-msg {:algorithm :sha384}) hash-long-msg-sha384)
+
+  (= (hash test-msg {:algorithm :sha3-256}) hash-msg-sha3-256)
+  (= (hash test-long-msg {:algorithm :sha3-256}) hash-long-msg-sha3-256)
+  (= (hash test-msg {:algorithm :sha3-384}) hash-msg-sha3-384)
+  (= (hash test-long-msg {:algorithm :sha3-384}) hash-long-msg-sha3-384)
+  
   )
 

           [org.bouncycastle.jce.provider BouncyCastleProvider]
           [org.bouncycastle.jcajce.provider.asymmetric.ec KeyPairGeneratorSpi$ECDSA
            BCECPrivateKey BCECPublicKey]
           [java.util Arrays]
           [javax.crypto.spec SecretKeySpec]
           [javax.crypto SecretKeyFactory]
           [java.security KeyFactory KeyPairGenerator SecureRandom Security]
           [java.security.spec ECPoint ECParameterSpec ECPublicKeySpec ECPrivateKeySpec])
  (:refer-clojure :exclude [hash]))


  "Hashes messages msg using options opts.
  Params
        msg (byte[])
        opts (Object) an object that encapsulates property “algorithm” with values for
        hashing algorithms such as “SHA2” or “SHA3”
  Returns
        (Key) An instance of the Key class corresponding to the ski"
  [msg {:keys [algorithm]}]
  (let [md (MessageDigest/getInstance (name algorithm))]
    (Hex/toHexString (.digest md (if (string? msg)
                                   (.getBytes ^String msg)
                                   msg)))))
;;(hash test-msg {:algorithm :sha384})


;;;encrypt
