summaryrefslogtreecommitdiffstats
path: root/common-util/src/main/java/org/openo/baseservice/encrypt/cbb
diff options
context:
space:
mode:
authortian.ming@huawei.com <tian.ming@huawei.com>2016-09-10 12:41:16 +0800
committertian.ming@huawei.com <tian.ming@huawei.com>2016-09-10 15:46:25 +0800
commit7476493080d6c7dc895f1eeda7d4781c8295b03f (patch)
treedcbbaa7f416fa7e2da285f60085bbb8dcbb331d2 /common-util/src/main/java/org/openo/baseservice/encrypt/cbb
parentfd23b5c6940b86e1f98742ea0537917d4266f0c9 (diff)
Modify license information.
JIRA:https://jira.open-o.org/browse/OCS-46 Change-Id: Iff62c4f5a9f29e20ab6f54772f60b1ab7ea65b1a Signed-off-by: tian.ming@huawei.com <tian.ming@huawei.com> fix the build error. Change-Id: Iecab881eaad2442d48da9a162f2207f742e6982c Signed-off-by: tian.ming@huawei.com <tian.ming@huawei.com> fix the build error. Change-Id: Iecab881eaad2442d48da9a162f2207f742e6982c Signed-off-by: tian.ming@huawei.com <tian.ming@huawei.com>
Diffstat (limited to 'common-util/src/main/java/org/openo/baseservice/encrypt/cbb')
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/CipherCreator.java16
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipher.java11
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipherFactory.java10
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipher.java10
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipherFactory.java10
-rw-r--r--common-util/src/main/java/org/openo/baseservice/encrypt/cbb/sha/Sha256.java12
6 files changed, 35 insertions, 34 deletions
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/CipherCreator.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/CipherCreator.java
index c3e59b9..d964cbc 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/CipherCreator.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/CipherCreator.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -27,7 +27,7 @@ import org.openo.baseservice.encrypt.cbb.inf.AbstractCipherFactory;
* </p>
*
* @author
- * @version SDNO 0.5 08-Jun-2016
+ * @version 08-Jun-2016
*/
public final class CipherCreator {
@@ -41,7 +41,7 @@ public final class CipherCreator {
* private
* </p>
*
- * @since SDNO 0.5
+ * @since
*/
private CipherCreator() {
@@ -52,7 +52,7 @@ public final class CipherCreator {
* <br/>
*
* @return
- * @since SDNO 0.5
+ * @since
*/
public static CipherCreator instance() {
return instance;
@@ -63,7 +63,7 @@ public final class CipherCreator {
* <br/>
*
* @return cipher instance with default key.
- * @since SDNO 0.5
+ * @since
*/
public AbstractCipher create() {
return factory.createCipherManager();
@@ -75,7 +75,7 @@ public final class CipherCreator {
*
* @param key the key to be used for encryption and decryption.
* @return cipher instance with specified key.
- * @since SDNO 0.5
+ * @since
*/
public AbstractCipher create(final String key) {
return factory.createCipherManager(key);
@@ -86,7 +86,7 @@ public final class CipherCreator {
* <br/>
*
* @param factory cipher factory.
- * @since SDNO 0.5
+ * @since
*/
public void setFactory(final AbstractCipherFactory factory) {
this.factory = factory;
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipher.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipher.java
index c9d7123..2d36dd8 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipher.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipher.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
* </p>
*
* @author
- * @version SDNO 0.5 31-May-2016
+ * @version 31-May-2016
*/
public class AesCipher implements AbstractCipher {
@@ -56,7 +56,7 @@ public class AesCipher implements AbstractCipher {
* Creates default key.
* </p>
*
- * @since SDNO 0.5
+ * @since
*/
public AesCipher() {
super();
@@ -64,11 +64,12 @@ public class AesCipher implements AbstractCipher {
}
/**
+ *
* Constructor<br/>
* <p>
* </p>
*
- * @since SDNO 0.5
+ * @since
* @param ckey: key.
*/
public AesCipher(final String key) {
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipherFactory.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipherFactory.java
index 39fe605..95e7336 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipherFactory.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/impl/AesCipherFactory.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -24,7 +24,7 @@ import org.openo.baseservice.encrypt.cbb.inf.AbstractCipherFactory;
* </p>
*
* @author
- * @version SDNO 0.5 03-Jun-2016
+ * @version 03-Jun-2016
*/
public class AesCipherFactory implements AbstractCipherFactory {
@@ -32,7 +32,7 @@ public class AesCipherFactory implements AbstractCipherFactory {
* Creates new CipherManager instance.<br/>
*
* @return new cipher manager instance.
- * @since SDNO 0.5
+ * @since
*/
@Override
public AbstractCipher createCipherManager() {
@@ -44,7 +44,7 @@ public class AesCipherFactory implements AbstractCipherFactory {
*
* @param key new cipher manager instance.
* @return
- * @since SDNO 0.5
+ * @since
*/
@Override
public AbstractCipher createCipherManager(final String key) {
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipher.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipher.java
index 4357d86..608dd82 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipher.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipher.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -23,7 +23,7 @@ package org.openo.baseservice.encrypt.cbb.inf;
* </p>
*
* @author
- * @version SDNO 0.5 31-May-2016
+ * @version 31-May-2016
*/
public interface AbstractCipher {
@@ -33,7 +33,7 @@ public interface AbstractCipher {
*
* @param plain string to be encrypted.
* @return encrypted string.
- * @since SDNO 0.5
+ * @since
*/
String encrypt(String plain);
@@ -43,7 +43,7 @@ public interface AbstractCipher {
*
* @param encrypted String is encrypted by AES 128
* @return plain after decrypt
- * @since SDNO 0.5
+ * @since
*/
String decrypt(String encrypted);
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipherFactory.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipherFactory.java
index 2d6f2ad..e820250 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipherFactory.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/inf/AbstractCipherFactory.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -21,7 +21,7 @@ package org.openo.baseservice.encrypt.cbb.inf;
* </p>
*
* @author
- * @version SDNO 0.5 03-Jun-2016
+ * @version 03-Jun-2016
*/
public interface AbstractCipherFactory {
@@ -29,7 +29,7 @@ public interface AbstractCipherFactory {
* Creates new CipherManager instance.<br/>
*
* @return new cipher manager instance.
- * @since SDNO 0.5
+ * @since
*/
AbstractCipher createCipherManager();
@@ -38,7 +38,7 @@ public interface AbstractCipherFactory {
*
* @param key new cipher manager instance.
* @return
- * @since SDNO 0.5
+ * @since
*/
AbstractCipher createCipherManager(final String key);
diff --git a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/sha/Sha256.java b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/sha/Sha256.java
index 74cc2bb..bbead3e 100644
--- a/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/sha/Sha256.java
+++ b/common-util/src/main/java/org/openo/baseservice/encrypt/cbb/sha/Sha256.java
@@ -1,11 +1,11 @@
/*
- * 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,
@@ -34,7 +34,7 @@ import javax.xml.bind.DatatypeConverter;
* </p>
*
* @author
- * @version SDNO 0.5 03-Jun-2016
+ * @version 03-Jun-2016
*/
public final class Sha256 {
@@ -49,7 +49,7 @@ 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);
@@ -71,7 +71,7 @@ public final class Sha256 {
* @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);
@@ -95,7 +95,7 @@ public final class Sha256 {
* @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");