package cz.moneta.test.utils;

import java.util.Base64;
import java.util.Scanner;

/**
 * Method for creating a hash for Jira logging
 * Local use only
 */
public class JiraHashConvertor {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter your SSO: ");
        String username = scanner.nextLine();
        System.out.println("Enter your Windows password: ");
        String pwd = scanner.nextLine();

        String encodedString = Base64.getEncoder().encodeToString((username + ":" + pwd).getBytes());
        System.out.println("\nYour Jira hash is: \n" + encodedString);
    }
}