Modified Passphrase.fromPassword() to fit Kotlin needs (#101)

* Added @Nonnull annotation to Passphrase.fromPassword()
This commit is contained in:
Den 2021-04-10 15:32:24 +03:00 committed by GitHub
parent 39e87f9ce4
commit 491ab93c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
*/
package org.pgpainless.util;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Arrays;
@ -40,7 +41,7 @@ public class Passphrase {
* @param password password
* @return passphrase
*/
public static Passphrase fromPassword(String password) {
public static Passphrase fromPassword(@Nonnull String password) {
return new Passphrase(password.toCharArray());
}