
com.theicenet.cryptography.random.SecureRandomDataService Maven / Gradle / Ivy
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.theicenet.cryptography.random;
/**
* A SecureRandomDataService instance is a component which generates secure random data.
*
* @apiNote Any implementation of this interface must be unconditionally thread-safe.
*
* @author Juan Fidalgo
* @since 1.1.0
*/
public interface SecureRandomDataService {
/**
* Generates a secure random array of bytes with length lengthInBytes.
*
* @apiNote Data must be secure random generated.
*
* @param lengthInBytes length of the secure random generated byte array
* @return secure random byte array with length lengthInBytes
*/
byte[] generateSecureRandomData(int lengthInBytes);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy