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

rs.otp.secret.AbstractSecret Maven / Gradle / Ivy

/**
 * 
 */
package rs.otp.secret;

/**
 * Abstract implementation of a secret generator.
 * 
 * @author ralph
 *
 */
public abstract class AbstractSecret implements ISecret {

	private byte[] bytes;
	
	/**
	 * Constructor with byte array of secret
	 * @param bytes - the bytes of this secret.
	 */
	public AbstractSecret(byte[] bytes) {
		this.bytes = bytes;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public byte[] getBytes() {
		return bytes;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		return encode();
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy