diff options
Diffstat (limited to 'security-utils/src/main/java/com/yahoo/security/Base58.java')
-rw-r--r-- | security-utils/src/main/java/com/yahoo/security/Base58.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/security-utils/src/main/java/com/yahoo/security/Base58.java b/security-utils/src/main/java/com/yahoo/security/Base58.java new file mode 100644 index 00000000000..3010bc878a8 --- /dev/null +++ b/security-utils/src/main/java/com/yahoo/security/Base58.java @@ -0,0 +1,22 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.security; + +/** + * Base58 encoding using the alphabet standardized by Bitcoin et al., which avoids + * the use of characters [0OIl] to avoid visual ambiguity. It does not feature any + * potential word/line-breaking characters, which means encoded strings can usually + * be selected in one go on web pages or in the terminal. + * + * @see <a href="https://en.wikipedia.org/wiki/Base58">Base58 on Wiki</a> + * + * @author vekterli + */ +public class Base58 { + + private static final BaseNCodec INSTANCE = BaseNCodec.of("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"); + + public static BaseNCodec codec() { + return INSTANCE; + } + +} |