![JAR search and dependency download from the Maven repository](/logo.png)
com.jingtum.core.config.Config Maven / Gradle / Ivy
The newest version!
/*
* Copyright www.jingtum.com Inc.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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
*
* http://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.jingtum.core.config;
import com.jingtum.core.encodings.B58IdentiferCodecs;
import com.jingtum.core.encodings.base58.B58;
// A global registry, not reading the Jingtum config
public class Config {
public static final String DEFAULT_ALPHABET = "jpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65rkm8oFqi1tuvAxyz";
private static B58IdentiferCodecs b58IdentiferCodecs;
public static void setAlphabet(String alphabet) {
B58 b58 = new B58(alphabet);
b58IdentiferCodecs = new B58IdentiferCodecs(b58);
}
/**
* @return the configured B58IdentiferCodecs object
*/
public static B58IdentiferCodecs getB58IdentiferCodecs() {
return b58IdentiferCodecs;
}
/***
* We set up all the defaults here
*/
static {
setAlphabet(DEFAULT_ALPHABET);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy