cryptoProviders.frink

View or download cryptoProviders.frink in plain text format


// This program lists the ciphers and algorithms available for cryptography.

// Attempt to install BouncyCastle if you have it in your CLASSPATH.
//   https://www.bouncycastle.org/java.html
//
//   bcp = newJava["org.bouncycastle.jce.provider.BouncyCastleProvider", []]
//   callJava["java.security.Security", "addProvider", [bcp]]

providers = callJava["java.security.Security", "getProviders", []]

println["Providers:"]
for p = providers
   println["   " + p.toString[]]

println[]

for p = providers
   for s = sort[p.keys[]]
      println[s]


// The following will list all MessageDigests.  Note that the Service
// class does not exist before Java 1.5.  Note that this does not list
// all of the aliases.  

println["\n\nMessageDigests:"]
   
for p = providers
   for service = p.getServices[]
      if service.getType[] == "MessageDigest"
         println[service.getAlgorithm[]]
      
   


View or download cryptoProviders.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17651 days, 18 hours, 57 minutes ago.