Skip to content

Commit

Permalink
Update annotation to NotNull
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys Tkachenko authored and Borys Tkachenko committed Dec 11, 2024
1 parent 4aa28c9 commit e08c5a2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.comet.opik.infrastructure;

import jakarta.validation.constraints.NotBlank;
import lombok.NonNull;

import javax.crypto.BadPaddingException;
Expand All @@ -27,7 +26,7 @@ public static void setConfig(@NonNull OpikConfiguration config) {
key = new SecretKeySpec(keyBytes, ALGO);
}

public static String encrypt(@NotBlank String data) {
public static String encrypt(@NonNull String data) {
try {
Cipher c = Cipher.getInstance(ALGO);
c.init(Cipher.ENCRYPT_MODE, key);
Expand All @@ -39,7 +38,7 @@ public static String encrypt(@NotBlank String data) {
}
}

public static String decrypt(@NotBlank String encryptedData) {
public static String decrypt(@NonNull String encryptedData) {
try {
Cipher c = Cipher.getInstance(ALGO);
c.init(Cipher.DECRYPT_MODE, key);
Expand Down

0 comments on commit e08c5a2

Please sign in to comment.