cryptoProviders.frink

View or download cryptoProviders.frink in plain text format


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

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 17536 days, 5 hours, 45 minutes ago.