/*
- * Copyright (c) 2016, Huawei Technologies Co., Ltd.
+ * Copyright 2016 Huawei Technologies Co., Ltd.
*
* Licensed 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
+ * 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,
* </p>
*
* @author
- * @version SDNO 0.5 03-Jun-2016
+ * @version 03-Jun-2016
*/
public final class Sha256 {
*
* @param data: The data to be digested.
* @return Hex encoded digested data.
- * @since SDNO 0.5
+ * @since
*/
public static String digest(final String data) {
final byte[] dataBytes = data.getBytes(StandardCharsets.UTF_8);
* @param key: The signing key.
* @return Hex encoded HMAC signature.
* @throws InvalidKeyException if the key is invalid.
- * @since SDNO 0.5
+ * @since
*/
public static String mac(final String data, final Key key) throws InvalidKeyException {
final byte[] dataBytes = data.getBytes(StandardCharsets.UTF_8);
* @param data: The data to be signed.
* @param secret: The signing key.
* @return Hex encoded HMAC signature.
- * @since SDNO 0.5
+ * @since
*/
public static String mac(final String data, final byte[] secret) {
final Key key = new SecretKeySpec(secret, "HmacSHA256");