All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.granite.crypto.spi.KeyGenerator Maven / Gradle / Ivy

/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * ___________________
 *
 *  Copyright 2016 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.adobe.granite.crypto.spi;

import org.osgi.annotation.versioning.ProviderType;

import com.adobe.granite.crypto.CryptoException;

/**
 * The KeyGenerator provides a simple API to securely-generate cryptographic keys. 
 * Currently supported algorithm are defined in {@link com.adobe.granite.crypto.spi.Algorithms} 
 */
@ProviderType
public interface KeyGenerator {
    
    /**
     * initialize and return a byte array containing a securely-generated cryptographic key.
     * 
     * @param algorithm the standard string name of the algorithm.
     *                  Currently supported algorithm are defined 
     *                  in {@link com.adobe.granite.crypto.spi.Algorithms}
     *                  The key will be suitable for storage.
     * @throws CryptoException If any problem occurs while initializing the key
     * @return a byte array containing a securely-generated cryptographic key.
     */
    public byte[] initKey(Algorithms algorithm)  throws CryptoException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy