15df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro/* 25df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * Licensed to the Apache Software Foundation (ASF) under one or more 35df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * contributor license agreements. See the NOTICE file distributed with 45df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * this work for additional information regarding copyright ownership. 55df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * The ASF licenses this file to You under the Apache License, Version 2.0 65df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * (the "License"); you may not use this file except in compliance with 75df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * the License. You may obtain a copy of the License at 85df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * 95df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * http://www.apache.org/licenses/LICENSE-2.0 105df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * 115df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * Unless required by applicable law or agreed to in writing, software 125df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * distributed under the License is distributed on an "AS IS" BASIS, 135df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * See the License for the specific language governing permissions and 155df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * limitations under the License. 165df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro */ 175df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 185df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giropackage org.apache.harmony.security.provider.crypto; 195df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 205df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giroimport java.security.Provider; 215df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 225df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro/** 235df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * Implementation of Provider for SecureRandom. The implementation supports the 245df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * "SHA1PRNG" algorithm described in JavaTM Cryptography Architecture, API 255df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * Specification & Reference 265df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro */ 275df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 285df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giropublic final class CryptoProvider extends Provider { 295df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 305df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro private static final long serialVersionUID = 7991202868423459598L; 315df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 325df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro /** 335df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro * Creates a Provider and puts parameters 345df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro */ 355df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro public CryptoProvider() { 365df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro super("Crypto", 1.0, "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)"); 375df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro 385df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro put("SecureRandom.SHA1PRNG", 395df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro "org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl"); 405df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro put("SecureRandom.SHA1PRNG ImplementedIn", "Software"); 415df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro } 425df38d1ae2e3615430ff6fe476b9cea9e6177bb1Sergio Giro} 43