当前位置: 首页>>代码示例>>Java>>正文


Java StringHelper.getHexEncoded方法代码示例

本文整理汇总了Java中com.helger.commons.string.StringHelper.getHexEncoded方法的典型用法代码示例。如果您正苦于以下问题:Java StringHelper.getHexEncoded方法的具体用法?Java StringHelper.getHexEncoded怎么用?Java StringHelper.getHexEncoded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.helger.commons.string.StringHelper的用法示例。


在下文中一共展示了StringHelper.getHexEncoded方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toString

import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Override
public String toString ()
{
  if (m_sIndentationStringToString == null)
    m_sIndentationStringToString = StringHelper.getHexEncoded (m_sIndentationString.getBytes (StandardCharsets.ISO_8859_1));
  return new ToStringGenerator (this).append ("xmlVersion", m_eXMLVersion)
                                     .append ("serializeXMLDecl", m_eSerializeXMLDecl)
                                     .append ("serializeDocType", m_eSerializeDocType)
                                     .append ("serializeComments", m_eSerializeComments)
                                     .append ("indent", m_eIndent)
                                     .append ("indentDeterminator", m_aIndentDeterminator)
                                     .append ("incorrectCharHandling", m_eIncorrectCharacterHandling)
                                     .append ("charset", m_aCharset)
                                     .append ("namespaceContext", m_aNamespaceContext)
                                     .append ("doubleQuotesForAttrs", m_bUseDoubleQuotesForAttributes)
                                     .append ("bracketModeDeterminator", m_aBracketModeDeterminator)
                                     .append ("spaceOnSelfClosedElement", m_bSpaceOnSelfClosedElement)
                                     .append ("newlineMode", m_eNewLineMode)
                                     .append ("indentationString", m_sIndentationStringToString)
                                     .append ("emitNamespaces", m_bEmitNamespaces)
                                     .append ("putNamespaceContextPrefixesInRoot",
                                              m_bPutNamespaceContextPrefixesInRoot)
                                     .getToString ();
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:25,代码来源:XMLWriterSettings.java

示例2: generateNewTokenID

import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
public static String generateNewTokenID (@Nonnegative final int nBytes)
{
  final byte [] aID = new byte [nBytes];
  RandomHelper.getRandom ().nextBytes (aID);
  return StringHelper.getHexEncoded (aID);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:8,代码来源:AuthTokenIDGenerator.java

示例3: getHexEncodedDigestString

import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
/**
 * @return The hex-encoded String of the message digest bytes. Never
 *         <code>null</code>.
 */
@Nonnull
@Nonempty
public String getHexEncodedDigestString ()
{
  return StringHelper.getHexEncoded (m_aDigestBytes);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:11,代码来源:MessageDigestValue.java

示例4: createPasswordHash

import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
public String createPasswordHash (@Nonnull final IPasswordSalt aSalt, @Nonnull final String sPlainTextPassword)
{
  ValueEnforcer.notNull (aSalt, "Salt");
  ValueEnforcer.notNull (sPlainTextPassword, "PlainTextPassword");

  final byte [] aDigest = pbkdf2 (sPlainTextPassword.toCharArray (),
                                  aSalt.getSaltBytes (),
                                  m_nIterations,
                                  m_nHashBytes);
  return StringHelper.getHexEncoded (aDigest);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:13,代码来源:AbstractPasswordHashCreatorPBKDF2.java

示例5: PasswordSalt

import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
/**
 * Constructor to create a new password salt with the provided byte count.
 *
 * @param nSaltBytes
 *        The number of salt bytes to use. Must be &gt; 0.
 */
public PasswordSalt (@Nonnegative final int nSaltBytes)
{
  ValueEnforcer.isGT0 (nSaltBytes, "SaltBytes");
  m_aBytes = new byte [nSaltBytes];
  RandomHelper.getRandom ().nextBytes (m_aBytes);
  m_sSalt = StringHelper.getHexEncoded (m_aBytes);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:14,代码来源:PasswordSalt.java


注:本文中的com.helger.commons.string.StringHelper.getHexEncoded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。