2 * Copyright © 2018 Inocybe Technologies and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.aaa.impl.password.service;
10 import org.opendaylight.aaa.api.password.service.PasswordHash;
12 public final class PasswordHashImpl implements PasswordHash {
13 private final String algorithmName;
14 private final String salt;
15 private final int iterations;
16 private final String hashedPassword;
18 private PasswordHashImpl(final String algorithmName, final String salt, final int iterations,
19 final String hashedPassword) {
20 this.algorithmName = algorithmName;
22 this.iterations = iterations;
23 this.hashedPassword = hashedPassword;
26 public static PasswordHash create(final String algorithmName, final String salt, final int iterations,
27 final String hashedPassword) {
29 return new PasswordHashImpl(algorithmName, salt, iterations, hashedPassword);
33 public String getAlgorithmName() {
38 public String getSalt() {
43 public int getIterations() {
48 public String getHashedPassword() {
49 return hashedPassword;