apache-comnons系列之commons-codec1.11 学习笔记

58 篇文章 0 订阅
53 篇文章 1 订阅

apache-comnons系列之commons-codec1.11 学习笔记

概述

  • Base64
    • Provides Base64 encoding and decoding as defined by RFC 2045.
  • DigestUtils
    • Operations to simplify common {@link java.security.MessageDigest} tasks.
    • This class is immutable and thread-safe.
    • However the MessageDigest instances it creates generally won’t be.
  • MessageDigestAlgorithms
    • Standard {@link MessageDigest} algorithm names from the Java Cryptography Architecture Standard Algorithm Name Documentation.
  • URLCodec
    • Implements the ‘www-form-urlencoded’ encoding scheme, also misleadingly known as URL encoding.
    • This class is thread-safe since 1.11
  • Encoder
    • Provides the highest level of abstraction for Encoders
  • Decoder
    • Provides the highest level of abstraction for Decoders

测试

  • org.apache.commons.codec.binary.Base64Test
    • encodeBase64String
      • A-Z/a-z/0-9/-_
      • They are formed by taking a block of 3 octets to form a 24-bit string,which is converted into 4 BASE64 characters.
    • decodeBase64
      • Decodes a Base64 String into octets.
  • org.apache.commons.codec.digest.DigestUtilsTest
    • md5Hex
      • Calculates the MD5 digest and returns the value as a 32 character hex string.
    • sha1Hex
      • Calculates the SHA-1 digest and returns the value as a hex string.
    • digestAsHex
      • Reads through a byte array and returns the digest for the data.
  • org.apache.commons.codec.net.URLCodecTest
    • ESCAPE_CHAR = ‘%’
    • encode
      • Encodes a string into its URL safe form using the specified string charset. Unsafe characters are escaped.
    • decode
      • Decodes a URL safe string into its original form using the specified encoding. Escaped characters are converted back to their original representation
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值